STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vccorlib.h
Go to the documentation of this file.
1 //
2 // Copyright (C) Microsoft Corporation
3 // All rights reserved.
4 //
5 // This header is included by the compiler using /FI when /ZW is specified
6 // Do not include any headers in this file
7 #ifndef _VCCORLIB_H_
8 #define _VCCORLIB_H_
9 
10 #ifdef _MSC_VER
11 #pragma once
12 
13 #pragma push_macro("_STRINGIZEX")
14 #pragma push_macro("_STRINGIZE")
15 
16 #undef _STRINGIZEX
17 #undef _STRINGIZE
18 
19 #define _STRINGIZEX(x) #x
20 #define _STRINGIZE(x) _STRINGIZEX(x)
21 
22 #pragma detect_mismatch("_VCCORLIB_VER", "1800." _STRINGIZE(__cplusplus_winrt)) // Detect vccorlib mismatch
23 
24 #pragma pop_macro("_STRINGIZE")
25 #pragma pop_macro("_STRINGIZEX")
26 #endif // _MSC_VER
27 
28 #if !defined(__cplusplus_winrt)
29 #error vccorlib.h can only be used with /ZW
30 #endif
31 
32 #if defined(VCWINRT_DLL)
33 #include <stdio.h>
34 #include <windows.h>
35 #include <inspectable.h>
36 #include <WinString.h>
37 #endif
38 
39 // All WinRT types should have a packing (the default C++ packing).
40 #ifdef _WIN64
41 #pragma pack(push, 16)
42 #else
43 #pragma pack(push, 8)
44 #endif
45 
46 // <InternalComment>
47 // READ THIS BEFORE MAKING CHANGES TO THIS FILE:
48 // This is a force-include file which is used by all /ZW compilations, and akin to a typesrc file.
49 // /ZW should be usable to build any existing body of C++ code (including Windows, SQL, Office etc.)
50 // As such, the following rules should be observed:
51 // * Do not include any header files that have any behavior that can be changed by the user (e.g. #ifdef)
52 // * Do not declare a method or typename that can conflict with an existing method or type that comes from a header
53 // if the header may modify that type based on user #defines.
54 // General rules:
55 // * Keep PDB sizes small. Don't overuse templates, and keep identifiers short.
56 // </InternalComment>
57 
58 // <InternalComment>
59 // Postconditions: ParsingInitTypes is set
60 // </InternalComment>
61 
62 #if defined(__VCCORLIB_H_ENABLE_ALL_WARNINGS)
63 #pragma warning(push)
64 #endif
65 
66 // Following warnings disabled globally
67 // To enable these warnings define __VCCORLIB_H_ENABLE_ALL_WARNINGS
68 #pragma warning(disable: 4514) // unreferenced inline function has been removed
69 #pragma warning(disable: 4710) // function not inlined
70 #pragma warning(disable: 4711) // selected for automatic inline expansion
71 
72 // Following warnings disabled for this file
73 #pragma warning( push )
74 #pragma warning(disable: 4127) // conditional expression is constant
75 #pragma warning(disable: 4483) // Allows us to use __identifier
76 #pragma warning(disable: 4820) // bytes padding added after data member
77 
78 #define _VCCORLIB_THREADING_MODEL_DEFAULT 0
79 #define _VCCORLIB_THREADING_MODEL_STA 1
80 #define _VCCORLIB_THREADING_MODEL_MTA 2
81 #define _VCCORLIB_THREADING_MODEL_OVERRIDE 3
82 
83 #pragma initialize_winrt_types_start
84 
85 struct HSTRING__;
86 typedef HSTRING__* __abi_HSTRING;
87 
88 __declspec(noreturn) void __stdcall __abi_WinRTraiseException(long);
89 
90 #if !defined(VCWINRT_DLL)
91 __declspec(dllimport) long __stdcall __abi_translateCurrentException(bool reserved);
92 #else
93 __declspec(dllexport) long __stdcall __abi_translateCurrentException(bool reserved);
94 #endif
95 
96 inline void __abi_ThrowIfFailed(long __hrArg)
97 {
98  if (__hrArg < 0)
99  {
100  __abi_WinRTraiseException(__hrArg);
101  }
102 }
103 
104 #if !defined(VCWINRT_DLL)
105 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_FailFast();
106 #else
107 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_FailFast();
108 #endif
109 
110 namespace __winRT
111 {
112  long __stdcall __windowsCreateString(const __wchar_t*, int, __abi_HSTRING*);
113  long __stdcall __getActivationFactoryByPCWSTR(void*, ::Platform::Guid&, void**);
114  long __stdcall __getIids(int, unsigned long*, const __s_GUID*, ::Platform::Guid**);
115 }
116 
117 namespace Windows
118 {
119  namespace Foundation
120  {
121  }
122 }
123 
125 {
127 
136  int refcount;
137 
139  {
140  callback = nullptr;
141  numcalls_QueryInterface = 0;
142  numcalls_AddRef = 0;
143  numcalls_Release = 0;
144  numcalls_GetIids = 0;
145  numcalls_GetRuntimeClassName = 0;
146  numcalls_GetTrustLevel = 0;
147  numcalls_Other = 0;
148  destructed = 0;
149  refcount = 0;
150  }
151 
153  {
154  callback = __callbackArg;
156  }
157 
159  {
160  if (callback)
161  {
163  callback->numcalls_AddRef = numcalls_AddRef;
168  callback->numcalls_Other = numcalls_Other;
169  callback->destructed = destructed;
170  callback->refcount = refcount;
171  }
172  }
173 };
174 
175 //
186 __interface __declspec(uuid("00000000-0000-0000-C000-000000000046")) __abi_IUnknown
187 {
188 public:
189  virtual long __stdcall __abi_QueryInterface(::Platform::Guid&, void**) = 0;
190  virtual unsigned long __stdcall __abi_AddRef() = 0;
191  virtual unsigned long __stdcall __abi_Release() = 0;
192 };
193 
195 {
199 };
200 
201 __interface __declspec(uuid("3C5C94E8-83BB-4622-B76A-B505AE96E0DF")) __abi_Module
202 {
203 public:
204  virtual unsigned long __stdcall __abi_IncrementObjectCount() = 0;
205  virtual unsigned long __stdcall __abi_DecrementObjectCount() = 0;
206 };
207 
208 __interface __declspec(uuid("00000003-0000-0000-C000-000000000046")) __abi_IMarshal;
209 
210 extern __abi_Module* __abi_module;
211 
212 extern "C" long __cdecl _InterlockedIncrement(long volatile *);
213 extern "C" long __cdecl _InterlockedDecrement(long volatile *);
214 extern "C" long __cdecl _InterlockedCompareExchange(long volatile *, long, long);
215 extern "C" void* _InterlockedCompareExchangePointer(void* volatile *, void* , void*);
216 
217 #pragma intrinsic(_InterlockedIncrement)
218 #pragma intrinsic(_InterlockedDecrement)
219 #pragma intrinsic(_InterlockedCompareExchange)
220 #pragma intrinsic(_InterlockedCompareExchangePointer)
221 
222 // A class that represents a volatile refcount, that gets initialized to 0.
224 {
226 public:
227  __declspec(non_user_code) __abi_MultiThreadedRefCount() : __refcount(1)
228  {
229  if (__abi_module != nullptr)
230  {
231  __abi_module->__abi_IncrementObjectCount();
232  }
233  }
234 
235  // called for a partially created ref class i.e. exception thrown from ctor
236  __declspec(non_user_code) void __abi_dtor()
237  {
238  if (__abi_module != nullptr)
239  {
240  __abi_module->__abi_DecrementObjectCount();
241  }
242  }
243 
244  inline unsigned long Increment() volatile
245  {
246  return static_cast<unsigned long>(_InterlockedIncrement(&__refcount));
247  }
248 
249  inline unsigned long Decrement() volatile
250  {
251  unsigned long __refCountLoc = static_cast<unsigned long>(_InterlockedDecrement(&__refcount));
252  if (__refCountLoc == 0)
253  {
254  // When destructing objects at the end of the program, we might be freeing
255  // objects across dlls, and the dll this object is in might have already freed its module object.
256  if (__abi_module != nullptr)
257  {
258  __abi_module->__abi_DecrementObjectCount();
259  }
260  }
261  return __refCountLoc;
262  }
263 
264  inline unsigned long Get() volatile
265  {
266  return static_cast<unsigned long>(__refcount);
267  }
268  void ReleaseControlBlock() volatile
269  {
270  }
271 };
272 
273 __interface __declspec(uuid("AF86E2E0-B12D-4c6a-9C5A-D7AA65101E90")) __abi_IInspectable : public __abi_IUnknown
274 {
275  virtual long __stdcall __abi_GetIids(unsigned long*, ::Platform::Guid**) = 0;
276  virtual long __stdcall __abi_GetRuntimeClassName(__abi_HSTRING*) = 0;
277  virtual long __stdcall __abi_GetTrustLevel(__abi_TrustLevel*) = 0;
278 };
279 
280 __interface __declspec(uuid("00000001-0000-0000-C000-000000000046")) __abi_IClassFactory : public __abi_IUnknown
281 {
282  virtual long __stdcall __abi_CreateInstance(__abi_IUnknown*, ::Platform::Guid&, void**) = 0;
283  virtual long __stdcall __abi_LockServer(int) = 0;
284 };
285 
286 __interface __declspec(uuid("00000035-0000-0000-C000-000000000046")) __abi_IActivationFactory : public __abi_IInspectable
287 {
288  virtual long __stdcall __abi_ActivateInstance(__abi_IInspectable**) = 0;
289 };
290 
291 __interface __declspec(uuid("00000037-0000-0000-C000-000000000046")) __abi_IWeakReference : public __abi_IUnknown
292 {
293  virtual long __stdcall __abi_Resolve(::Platform::Guid&, __abi_IInspectable **) = 0;
294 };
295 
296 #if !defined(VCWINRT_DLL)
298 {
299  int __flags; // Bit flags which used for storing extra information
300  unsigned int __length; // length of string's unicode code point
301  unsigned int __padding; // padding for future use
302  unsigned int __morepadding; // padding for future use
303  __wchar_t* __stringRef; // An address pointer which points to a string buffer.
305 #else
306 typedef HSTRING_HEADER __Platform_Details_HSTRING_HEADER;
307 #endif
308 
309 namespace Platform { namespace Details {
310  struct EventLock
311  {
314  };
315 
316  template<typename T>
318  {
319  static EventLock __eventLock = { nullptr, nullptr };
320  return &__eventLock;
321  }
322 }} // namespace Platform::Details
323 
324 // <InternalComment>
325 // Initialize a set of PCH global roots from some of the types defined above this point.
326 // Preconditions: The following types must be defined before this point:
327 // __abi_IUnknown
328 // __abi_IInspectable
329 // __abi_IClassFactory
330 // __abi_IActivationFactory
331 // HSTRING
332 // __abi_TrustLevel
333 // ::Platform::Guid
334 // __abi_MultiThreadedRefCount
335 // Postconditions: * The following PCH global roots are initialized
336 // pWinRTIUnknown
337 // pWinRTIInspectable
338 // pWinRTIClassFactory
339 // pWinRTIActivationFactory
340 // pWinRTHSTRING
341 // pWinRTTrustLevel
342 // pWindowsFoundationGuid
343 // pWinRTMultiThreadedRefCount
344 // * Windows.Foundation.winmd is loaded
345 // * From this point on WinRT types can be declared using 'ref class', 'interface class' etc. BUT must have __declspec(no_weak_ref)
346 // * ParsingInitTypes is still set
347 // </InternalComment>
348 #pragma initialize_winrt_types_phase1
349 
350 namespace __abi_details
351 {
352  // String^
353  __declspec(non_user_code) __declspec(no_refcount) void __abi_delete_String(::Platform::String^);
354 
355 #if !defined(VCWINRT_DLL)
356  __declspec(dllimport) __declspec(non_user_code) __declspec(no_refcount)
357  ::Platform::Object ^ __stdcall __abi_cast_String_to_Object(::Platform::String^);
358 
359  __declspec(dllimport) __declspec(non_user_code)
360  ::Platform::String ^ __stdcall __abi_cast_Object_to_String(bool, ::Platform::Object^);
361 
362  __declspec(dllimport) __declspec(non_user_code) ::Platform::String^ __stdcall __abi_ObjectToString(::Platform::Object^ o, bool useIPrintable);
363 
364 #else
365  __declspec(dllexport) __declspec(non_user_code) __declspec(no_refcount)
366  ::Platform::Object ^ __stdcall __abi_cast_String_to_Object(::Platform::String^);
367 
368  __declspec(dllexport) __declspec(non_user_code)
369  ::Platform::String ^ __stdcall __abi_cast_Object_to_String(bool, ::Platform::Object^);
370 
371  __declspec(dllexport) __declspec(non_user_code) ::Platform::String^ __stdcall __abi_ObjectToString(::Platform::Object^ o, bool useIPrintable);
372 #endif
373 } // namespace __abi_details
374 
375 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
376  inline void* __abi_winrt_ptr_ctor(const volatile ::Platform::Object^ const __objArg)
377 {
378  __abi_IUnknown* __pUnknown = reinterpret_cast<__abi_IUnknown*>(const_cast< ::Platform::Object^>(__objArg));
379  if (__pUnknown) {
380  __pUnknown->__abi_AddRef();
381  }
382  return __pUnknown;
383 }
384 
385 __declspec(non_user_code) __declspec(no_refcount)
386  inline void __abi_winrt_ptr_dtor(const volatile ::Platform::Object^ const __objArg)
387 {
388  __abi_IUnknown* __pUnknown = reinterpret_cast<__abi_IUnknown*>(const_cast< ::Platform::Object^>(__objArg));
389  if (__pUnknown) {
390  __pUnknown->__abi_Release();
391  }
392 }
393 
394 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
395  inline void* __abi_winrt_ptr_assign(void** __ppTargetArg, const volatile ::Platform::Object^ __objArg)
396 {
397  __abi_IUnknown* __pUnknown = reinterpret_cast<__abi_IUnknown*>(const_cast< ::Platform::Object^>(__objArg));
398  __abi_IUnknown** __ppTargetUnknown = reinterpret_cast<__abi_IUnknown**>(__ppTargetArg);
399  if (__pUnknown != *__ppTargetUnknown)
400  {
401  if (__pUnknown) {
402  __pUnknown->__abi_AddRef();
403  }
404  if (*__ppTargetUnknown) {
405  (*__ppTargetUnknown)->__abi_Release();
406  }
407  *__ppTargetUnknown = __pUnknown;
408  }
409  return __pUnknown;
410 }
411 
412 template<typename T>
413 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
414  inline void* __abi_winrt_ptrto_delegate_ctor(const volatile T^ __objArg)
415 {
416  return __abi_winrt_ptr_ctor(reinterpret_cast<const volatile ::Platform::Object^>(__objArg));
417 }
418 
419 template<typename T>
420 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
421  inline void __abi_winrt_ptrto_delegate_dtor(const volatile T^ __objArg)
422 {
423  __abi_winrt_ptr_dtor(reinterpret_cast<const volatile ::Platform::Object^>(__objArg));
424 }
425 
426 template<typename T>
427 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
428  inline void* __abi_winrt_ptrto_delegate_assign(void** __ppTargetArg, const volatile T^ __objArg)
429 {
430  return __abi_winrt_ptr_assign(__ppTargetArg, reinterpret_cast<const volatile ::Platform::Object^>(__objArg));
431 }
432 
433 // Used for handle which is inside '__declspec(no_refcount)' function but still needs Release.
435 private:
436  __abi_IUnknown *__pUnknown;
437 public:
438  __declspec(non_user_code) __abi_dtor_helper(const volatile ::Platform::Object^ __objArg) {
439  __pUnknown = reinterpret_cast<__abi_IUnknown*>(const_cast< ::Platform::Object^>(__objArg));
440  }
441  __declspec(non_user_code) ~__abi_dtor_helper() {
442  if (__pUnknown) {
443  __pUnknown->__abi_Release();
444  }
445  }
446 };
447 
448 // The exceptions are split out explicitly in order to make them obvious from callstacks.
449 #if !defined(VCWINRT_DLL)
450 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseNotImplementedException();
451 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseInvalidCastException();
452 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseNullReferenceException();
453 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseOperationCanceledException();
454 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseFailureException();
455 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseAccessDeniedException();
456 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseOutOfMemoryException();
457 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseInvalidArgumentException();
458 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseOutOfBoundsException();
459 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseChangedStateException();
460 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseClassNotRegisteredException();
461 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseWrongThreadException();
462 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseDisconnectedException();
463 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseObjectDisposedException();
464 __declspec(dllimport) __declspec(noreturn) void __stdcall __abi_WinRTraiseCOMException(long);
465 #else
466 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseNotImplementedException();
467 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseInvalidCastException();
468 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseNullReferenceException();
469 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseOperationCanceledException();
470 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseFailureException();
471 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseAccessDeniedException();
472 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseOutOfMemoryException();
473 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseInvalidArgumentException();
474 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseOutOfBoundsException();
475 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseChangedStateException();
476 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseClassNotRegisteredException();
477 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseWrongThreadException();
478 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseDisconnectedException();
479 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseObjectDisposedException();
480 __declspec(dllexport) __declspec(noreturn) void __stdcall __abi_WinRTraiseCOMException(long);
481 #endif
482 
483 __declspec(non_user_code) __declspec(no_refcount)
484  inline ::Platform::Object^ __abi_winrt_cast_to(bool __isDynamicCastArg, ::Platform::Object^ __objArg, const _GUID& __guidArg)
485 {
486  void* __pTo = nullptr;
487  __abi_IUnknown* __pUnknown = reinterpret_cast<__abi_IUnknown*>(__objArg);
488 
489  if (__pUnknown) {
490  // Cast to ::Platform::Guid instead of using conversion in order to avoid copy to temporary
491  long __hr = __pUnknown->__abi_QueryInterface(reinterpret_cast< ::Platform::Guid&>(const_cast<_GUID&>(__guidArg)), &__pTo);
492 
493  if (__isDynamicCastArg && __hr != 0)
494  return nullptr;
495  // It will throw InvalidCastException on failure
496  __abi_ThrowIfFailed(__hr);
497  }
498 
499  return reinterpret_cast< ::Platform::Object^>(__pTo);
500 }
501 
502 __declspec(non_user_code) __declspec(no_refcount)
503  inline ::Platform::String^ __abi_winrt_cast_to_string(bool __isDynamicCast, ::Platform::Object^ __objArg)
504 {
505  return __abi_details::__abi_cast_Object_to_String(__isDynamicCast, __objArg);
506 }
507 
508 __declspec(non_user_code) __declspec(no_refcount)
509  inline ::Platform::Object^ __abi_winrt_cast_from_string_to_object(bool /*__isDynamicCastArg*/, ::Platform::String^ __objArg)
510 {
511  return __abi_details::__abi_cast_String_to_Object(__objArg);
512 }
513 
514 __declspec(non_user_code) __declspec(no_refcount)
515  inline ::Platform::Object^ __abi_winrt_cast_from_string_to_other(bool /*__isDynamicCastArg*/, ::Platform::String^ /*__objArg*/)
516 {
517  __abi_WinRTraiseInvalidCastException();
518 }
519 
520 template<typename T>
521 __declspec(non_user_code) __declspec(no_refcount)
522  inline T^ __abi_winrt_cast_from_object_to_delegate(bool __isDynamicCast, ::Platform::Object^ __objArg);
523 
524 template<typename T>
525 __declspec(non_user_code) __declspec(no_refcount)
526  inline ::Platform::Object^ __abi_winrt_cast_from_delegate_to_object(bool __isDynamicCastArg, T^ __objArg);
527 
528 template<typename T>
529 __declspec(non_user_code) __declspec(no_refcount)
530  inline ::Platform::Object^ __abi_winrt_cast_from_delegate_to_other(bool __isDynamicCastArg, T^ __objArg, const _GUID& __guidArg)
531 {
532  return __abi_winrt_cast_to(__isDynamicCastArg, reinterpret_cast< ::Platform::Object^>(__objArg), __guidArg);
533 }
534 
535 inline void* __detach_as_voidptr(void** __ppObjArg)
536 {
537  void* __pObj = *__ppObjArg;
538  *__ppObjArg = nullptr;
539  return __pObj;
540 }
541 
542 __declspec(non_user_code) __declspec(no_refcount)
543  inline void __abi_winrt_ptrto_string_dtor(const volatile ::Platform::String^ const __objArg)
544 {
545  __abi_details::__abi_delete_String(const_cast< ::Platform::String^>(__objArg));
546 }
547 
548 __declspec(non_user_code) inline void __abi_winrt_throw_on_disposed(bool isDisposed)
549 {
550  if (isDisposed)
551  {
552  __abi_WinRTraiseObjectDisposedException();
553  }
554 }
555 
556 
557 // Function declaration for types we use from Windows and CRT
558 // This prevents pulling in the headers
559 #if !defined(VCWINRT_DLL)
560 extern "C" long __stdcall __Platform_CoCreateFreeThreadedMarshaler(::Platform::Object^, ::Platform::Object^*);
561 #endif
562 
563 namespace Platform {
564  template <typename __TArg, unsigned int __dimension = 1>
565  ref class WriteOnlyArray;
566 
567  template <typename __TArg, unsigned int __dimension = 1>
568  ref class Array;
569 }
570 
571 template <typename __TArg, unsigned int __dimension>
572 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
573  void* __abi_winrt_ptrto_array_ctor(const volatile ::Platform::Array<__TArg, __dimension>^ const);
574 
575 template<typename __TArg, unsigned int __dimension>
576 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
577  void* __abi_winrt_ptrto_array_assign(void**, const volatile ::Platform::Array<__TArg, __dimension>^);
578 
579 __declspec(non_user_code) __declspec(no_refcount)
580  inline ::Platform::Object^ __abi_winrt_cast_use_helper(bool __isDynamicArg, void* __fromArg, const _GUID& __guidArg, __abi_IUnknown* __useresultArg)
581 {
582  if (__useresultArg)
583  {
584  return reinterpret_cast< ::Platform::Object^>(__useresultArg);
585  }
586 
587  return __abi_winrt_cast_to(__isDynamicArg, reinterpret_cast< ::Platform::Object^>(__fromArg), __guidArg);
588 }
589 
590 __declspec(selectany) void * __forceInstantiate1 = &__abi_winrt_cast_use_helper;
591 
592 __declspec(non_user_code) __declspec(no_refcount)
593  inline void __abi_winrt_ptr_dispose(const volatile ::Platform::Object^ const __objArg)
594 {
595  ::Platform::IDisposable ^__dispose = dynamic_cast< ::Platform::IDisposable ^>(const_cast< ::Platform::Object^>(__objArg));
596  if (__dispose) {
597  __dispose->__identifier("<Dispose>")();
598  reinterpret_cast<__abi_IUnknown*>(__dispose)->__abi_Release();
599  }
600 }
601 
602 __declspec(non_user_code) __declspec(no_refcount)
603  inline void __abi_winrt_ptr_dispose_dtor(const volatile ::Platform::Object^ const __objArg)
604 {
605  __abi_winrt_ptr_dispose(__objArg);
606  __abi_winrt_ptr_dtor(__objArg);
607 }
608 
610 
611 namespace Platform { namespace Details
612 {
613  class ControlBlock sealed : public __abi_IWeakReference
614  {
615 #if defined(VCWINRT_DLL)
616  public:
617 #else
618  private:
619 #endif
620  volatile long __weakRefCount;
621  volatile long __strongRefCount;
622  __abi_IUnknown* __target; // we shouldn't hold a strong reference to target, so grab an unaddref'd reference here.
626 
627  public:
628  // IWeakReference
629  virtual long __stdcall __abi_QueryInterface(::Platform::Guid& __riid, void** __ppvObject);
630 
631  virtual unsigned long __stdcall __abi_AddRef()
632  {
633  return static_cast<unsigned long>(_InterlockedIncrement(&__weakRefCount));
634  }
635 
636  virtual unsigned long __stdcall __abi_Release()
637  {
638  unsigned long __ref = static_cast<unsigned long>(_InterlockedDecrement(&__weakRefCount));
639  if (__ref == 0)
640  {
641  if (__bAlignedAllocation)
642  {
643  ::Platform::Details::Heap::AlignedFree(this);
644  }
645  else
646  {
648  }
649  }
650  return __ref;
651  }
652 
653 #if !defined(VCWINRT_DLL)
654  __declspec(dllimport) virtual long __stdcall __abi_Resolve(::Platform::Guid& __riid, __abi_IInspectable ** __objectReference);
655 #else
656  __declspec(dllexport) virtual long __stdcall __abi_Resolve(::Platform::Guid& __riid, __abi_IInspectable ** __objectReference);
657 #endif
658 
659  private:
660  unsigned long __stdcall IncrementStrongReference()
661  {
662  // InterlockedIncrement calls _InterlockedIncrement intrinsic thus we call directly _InterlockedIncrement to save the call
663  return static_cast<unsigned long>(_InterlockedIncrement(&__strongRefCount));
664  }
665 
666  unsigned long __stdcall DecrementStrongReference()
667  {
668  // InterlockedDecrement calls _InterlockedDecrement intrinsic thus we call directly _InterlockedDecrement to save the call
669  unsigned long __ref = static_cast<unsigned long>(_InterlockedDecrement(&__strongRefCount));
670  if (__ref == 0)
671  {
672  __strongRefCount = static_cast<int>(0xC0000000); // LONG_MIN / 2
673  }
674  return __ref;
675  }
676 
677  inline long __stdcall GetRefcount()
678  {
679  return __strongRefCount;
680  }
681 
683 
684 #if !defined(VCWINRT_DLL)
685  __declspec(dllimport) void InitControlBlock(void* __object, bool __bSingleAllocationParam = true, bool __bAlignedAllocationParam = false, bool __bExceptionAllocationParam = false);
686  __declspec(dllimport) void ReleaseTarget();
687 #else
688  __declspec(dllexport) void InitControlBlock(void* __object, bool __bSingleAllocationParam = true, bool __bAlignedAllocationParam = false, bool __bExceptionAllocationParam = false);
689  __declspec(dllexport) void ReleaseTarget();
690 #endif
691 
692  friend class __abi_FTMWeakRefData;
693  friend void* Details::Heap::Allocate(::Platform::SizeT, ::Platform::SizeT);
694  friend void* Details::Heap::AlignedAllocate(::Platform::SizeT, ::Platform::SizeT, ::Platform::SizeT);
695  friend void* Details::Heap::AllocateException(::Platform::SizeT __rcOffset, ::Platform::SizeT __sizeArg);
696  friend void* Details::Heap::AlignedAllocateException(::Platform::SizeT __rcOffset, ::Platform::SizeT __sizeArg, ::Platform::SizeT __alignment);
697  };
698 }} // ::Platform::Details
699 
700 // A class that represents a volatile refcount, that gets initialized to 0.
702 {
703 #if defined(VCWINRT_DLL)
704 public:
705 #endif
706  ::Platform::Details::ControlBlock* __weakRefSource;
707  __abi_IUnknown* volatile __pUnkMarshal;
708 
709 public:
710  __declspec(non_user_code) __abi_FTMWeakRefData(::Platform::Object^ __targetArg)
711  {
712  __pUnkMarshal = reinterpret_cast<__abi_IUnknown*>(-1);
713 
714  if (__abi_module != nullptr)
715  {
716  __abi_module->__abi_IncrementObjectCount();
717  }
718  }
719 
720  __declspec(non_user_code) __abi_FTMWeakRefData(::Platform::Object^ __targetArg, ::Platform::CallbackContext __contextArg)
721  {
722  if (__contextArg == ::Platform::CallbackContext::Any)
723  {
724  __pUnkMarshal = reinterpret_cast<__abi_IUnknown*>(-1);
725  }
726  else
727  {
728  __pUnkMarshal = nullptr;
729  }
730 
731  if (__abi_module != nullptr)
732  {
733  __abi_module->__abi_IncrementObjectCount();
734  }
735  }
736 
737  // called for a partially created ref class i.e. exception thrown from ctor
738  __declspec(non_user_code) void __abi_dtor()
739  {
740  if (__pUnkMarshal && __pUnkMarshal != reinterpret_cast<__abi_IUnknown*>(-1))
741  {
742  __pUnkMarshal->__abi_Release();
743  __pUnkMarshal = nullptr;
744  }
745 
746  if (__abi_module != nullptr)
747  {
748  __abi_module->__abi_DecrementObjectCount();
749  }
750 
751  __weakRefSource->DecrementStrongReference();
753  }
754 
755  inline unsigned long __stdcall Increment() volatile
756  {
757  if (__weakRefSource == nullptr || __weakRefSource->GetRefcount() < 0)
758  {
759  return static_cast<unsigned long>(-1); // Called during destruction
760  }
761 
762  return __weakRefSource->IncrementStrongReference();
763  }
764 
765  inline unsigned long __stdcall Decrement() volatile
766  {
767  if (__weakRefSource == nullptr || __weakRefSource->GetRefcount() < 0)
768  {
769  return static_cast<unsigned long>(-1); // Called during destruction
770  }
771 
772  unsigned long __refCount = __weakRefSource->DecrementStrongReference();
773  if (__refCount == 0)
774  {
775  if (__pUnkMarshal && __pUnkMarshal != reinterpret_cast<__abi_IUnknown*>(-1))
776  {
777  __pUnkMarshal->__abi_Release();
778  __pUnkMarshal = nullptr;
779  }
780 
781  // When destructing objects at the end of the program, we might be freeing
782  // objects across dlls, and the dll this object is in might have already freed its module object.
783  if (__abi_module != nullptr)
784  {
785  __abi_module->__abi_DecrementObjectCount();
786  }
787  }
788 
789  return __refCount;
790  }
791 
793  {
794  if (__pUnkMarshal == nullptr)
795  {
796  return nullptr;
797  }
798  return this;
799  }
800 
801  inline ::Platform::Details::IWeakReference^ GetWeakReference()
802  {
803  return reinterpret_cast< ::Platform::Details::IWeakReference^>(__weakRefSource);
804  }
805 
806  inline long __stdcall Get() volatile
807  {
808  if (__weakRefSource == nullptr)
809  {
810  return static_cast<unsigned long>(-1); // Called during destruction
811  }
812  return __weakRefSource->GetRefcount();
813  }
814 
815  long __stdcall __abi_QueryInterface(::Platform::Guid& __guid, void** __pOut);
816 
818  {
819  auto __localWeakRefSource = __weakRefSource;
820  __localWeakRefSource->ReleaseTarget();
821  __localWeakRefSource->__abi_Release();
822  }
823 };
824 
825 namespace Platform { namespace Details
826 {
827  struct __single_inheritance __abi_CaptureBase
828  {
829  protected:
830  virtual __stdcall ~__abi_CaptureBase() {}
831 
832  public:
833  static const size_t __smallCaptureSize = 4 * sizeof(void*);
834  void* operator new(size_t __sizeArg, void* __pSmallCaptureArg)
835  {
836  if (__sizeArg > __smallCaptureSize)
837  {
838  return reinterpret_cast<__abi_CaptureBase*>( ::Platform::Details::Heap::Allocate( __sizeArg ) );
839  }
840 
841  return __pSmallCaptureArg;
842  }
843 
844  void operator delete(void* __ptrArg, void* __pSmallCaptureArg)
845  {
846  __abi_CaptureBase* __pThis = static_cast<__abi_CaptureBase*>(__ptrArg);
847  __pThis->Delete(__pThis, __pSmallCaptureArg);
848  }
849 
850  inline void* GetVFunction(int __slotArg)
851  {
852  return (*reinterpret_cast<void***>(this))[__slotArg];
853  }
854 
855  void Delete(__abi_CaptureBase* __pThisArg, void* __pSmallCaptureArg)
856  {
857  __pThisArg->~__abi_CaptureBase();
858  if (__pThisArg != __pSmallCaptureArg)
859  {
861  }
862  }
863  };
864 
866  {
869  __abi_CapturePtr() : ptr( reinterpret_cast<__abi_CaptureBase*>(smallCapture) ) {}
871  {
872  ptr->Delete(ptr, smallCapture);
873  }
874  };
875 
876  template <typename __TFunctor, typename __TReturnType, typename... __TArgs>
878  {
879  __TFunctor functor;
880  __abi_FunctorCapture(__TFunctor __functor) : functor(__functor) {}
881  virtual __TReturnType __stdcall Invoke(__TArgs... __args) {return functor(__args...);}
882  };
883 }} // namespace Platform::Details
884 
885 // <InternalComment>
886 // Initialize a set of PCH global roots from some of the types defined above this point.
887 // Preconditions: See initialize_winrt_types_phase1 preconditions:
888 // __abi_FTMWeakRefData is now defined
889 // Postconditions: * From this point on WinRT types can be declared using 'ref class', 'interface class' etc.
890 // * ParsingInitTypes is still set
891 // </InternalComment>
892 
893 #pragma initialize_winrt_types_phase2
894 
895 namespace Platform
896 {
897  template <typename __TArg, unsigned int __dimension = 1>
899 
900  namespace Details
901  {
902  template <typename __HighLevelType, unsigned int __dimension>
903  ::Platform::Array<__HighLevelType, __dimension>^ __abi_array_attach(void* __src, unsigned int __size, bool __isFastPass, bool __needsInit);
904 
905  template <typename __HighLevelType, unsigned int __dimension>
906  void __abi_array_copy_to_and_release(::Platform::Array<__HighLevelType, __dimension>^ __arr, void** __dest, unsigned int* __size);
907 
908  template <typename __LowLevelType, typename __HighLevelType, unsigned int __dimension>
909  __LowLevelType* __abi_array_to_raw(const ::Platform::Array<__HighLevelType, __dimension>^);
910 
911  template <typename __TArg, bool = __is_enum(__TArg)>
912  struct array_helper;
913  } // namespace Details
914 
915 #pragma warning(push)
916 #pragma warning(disable: 4487)
917  // Partial specialization of one-dimensional Array
918  template <typename __TArg>
919  private ref class WriteOnlyArray<__TArg, 1>
920  {
921  protected private:
922  unsigned int __size; // number of elements
923  bool __fastpassflag; // true if "fast pass", else false
924  __TArg* __data; // actual data buffer, alloc'd if not "fast-pass"
925 
926  internal:
927  __TArg& set(unsigned int __indexArg, __TArg __valueArg);
928  property unsigned int Length {unsigned int get() const; }
929  property __TArg* Data { __TArg* get() const; }
930  property bool FastPass { bool get() const; }
931 
932  __TArg* begin() const;
933  __TArg* end() const;
934 
935  protected private:
936  WriteOnlyArray();
937  WriteOnlyArray(unsigned int __sizeArg);
938  WriteOnlyArray(__TArg* __dataArg, unsigned int __sizeArg);
939  void Clear();
940 
941  __TArg& get(unsigned int __indexArg) const;
942 
943  static __TArg* AllocateAndZeroInitialize(unsigned int __countArg);
944  static __TArg* AllocateAndCopyElements(const __TArg* __srcArg, unsigned int __countArg);
945 
946 #if defined(_PREFIX_) || defined(_PREFAST_)
947  internal:
948  __TArg& operator[](unsigned int __indexArg) const;
949 #endif // defined(_PREFIX_) || defined(_PREFAST_)
950  public:
951  virtual ~WriteOnlyArray();
952  };
953 
954  template <typename __TArg>
955  private ref class Array<__TArg,1> sealed :
956  public WriteOnlyArray<__TArg, 1>,
957  public [::Windows::Foundation::Metadata::Default] [::Platform::Metadata::RuntimeClassName] ::Platform::IBoxArray<__TArg>
958  {
959  public:
960  virtual property Array^ Value { virtual Array^ get(); }
961 
962  internal:
963  Array(const Array<__TArg, 1>^ __source);
964  Array(unsigned int __sizeArg);
965  Array(__TArg* __dataArg, unsigned int __sizeArg);
966  __TArg& get(unsigned int __indexArg) const;
967 #if defined(_PREFIX_) || defined(_PREFAST_)
968  __TArg& operator[](unsigned int __indexArg) const;
969 #endif // defined(_PREFIX_) || defined(_PREFAST_)
970 
971  private:
972  Array();
973  void Attach(__TArg* __srcArg, unsigned int __sizeArg);
974  void AttachFastPass(__TArg* __srcArg, unsigned int __sizeArg);
975  void CopyToOrDetach(__TArg** __destArg, unsigned int* __sizeArg);
976 
977  template <typename __HighLevelType, unsigned int __dimension>
978  friend ::Platform::Array<__HighLevelType, __dimension>^ ::Platform::Details::__abi_array_attach(void* __src, unsigned int __size, bool __isFastPass, bool __needsInit);
979 
980  template <typename __HighLevelType, unsigned int __dimension>
981  friend void ::Platform::Details::__abi_array_copy_to_and_release(::Platform::Array<__HighLevelType, __dimension>^ __arrArg, void** __destArg, unsigned int* __sizeArg);
982  template <typename __TArg, unsigned int __dimension> friend class ArrayReference;
983 
985  {
986  __vtable_initialize(Array<__TArg, 1>);
987  }
988  public:
989  virtual ~Array() {}
990  };
991 
992 #pragma warning(pop)
993 } // namespace Platform
994 
995 template <typename __TArg, unsigned int __dimension>
996 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
997  inline void* __abi_winrt_ptrto_array_ctor(const volatile ::Platform::Array<__TArg, __dimension>^ const __arrArg)
998 {
999  __abi_IUnknown* __pUnknown = reinterpret_cast<__abi_IUnknown*>(const_cast< ::Platform::Array<__TArg, __dimension>^>(__arrArg));
1000  if (__pUnknown)
1001  {
1002  auto __localArray = const_cast< ::Platform::Array<__TArg, __dimension>^>(const_cast< ::Platform::Array<__TArg, __dimension>^>(__arrArg));
1003  if (__localArray->FastPass)
1004  {
1005  auto __ret = ref new ::Platform::Array<__TArg, __dimension>(__localArray->Data, __localArray->Length);
1006  __pUnknown = reinterpret_cast<__abi_IUnknown*>(const_cast< ::Platform::Array<__TArg, __dimension>^>(__ret));
1007  }
1008  else
1009  {
1010  __pUnknown->__abi_AddRef();
1011  }
1012  }
1013  return __pUnknown;
1014 }
1015 
1016 template<typename __TArg, unsigned int __dimension>
1017 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
1018  void* __abi_winrt_ptrto_array_assign(void** __ppTarget, const volatile ::Platform::Array<__TArg, __dimension> ^__arrArg)
1019 {
1020  __abi_IUnknown* __pUnknown = reinterpret_cast<__abi_IUnknown*>(const_cast< ::Platform::Array<__TArg, __dimension>^>(__arrArg));
1021  __abi_IUnknown** __ppTargetUnknown = reinterpret_cast<__abi_IUnknown**>(__ppTarget);
1022  if (__pUnknown != *__ppTargetUnknown)
1023  {
1024  if (__pUnknown)
1025  {
1026  auto __localArray = const_cast< ::Platform::Array<__TArg, __dimension>^>(__arrArg);
1027  if (__localArray->FastPass)
1028  {
1029  auto __ret = ref new ::Platform::Array<__TArg>(__localArray->Data, __localArray->Length);
1030  __pUnknown = reinterpret_cast<__abi_IUnknown*>(const_cast< ::Platform::Array<__TArg, __dimension>^>(__ret));
1031  }
1032  else
1033  {
1034  __pUnknown->__abi_AddRef();
1035  }
1036  }
1037  if (*__ppTargetUnknown)
1038  {
1039  (*__ppTargetUnknown)->__abi_Release();
1040  }
1041  *__ppTargetUnknown = __pUnknown;
1042  }
1043  return __pUnknown;
1044 }
1045 
1046 template <typename __TArg>
1047 inline __TArg __winrt_Empty_Struct()
1048 {
1049  unsigned char __bytes[sizeof(__TArg)];
1050  __Platform_memset(__bytes, 0, sizeof(__TArg));
1051 
1052  return (__TArg&)__bytes;
1053 }
1054 
1056 {
1057  __abi_IUnknown* __factory;
1058  void* __cookie;
1059 };
1060 
1061 __declspec(selectany) __abi___FactoryCache __abi_no_factory_cache = { nullptr, 0 };
1062 
1064 {
1065  // Factory creator function
1066  long (__stdcall *__factoryCreator)(unsigned int*, __abi___classObjectEntry*, ::Platform::Guid&, __abi_IUnknown**);
1067  // Object id
1068  const __wchar_t* (__stdcall *__getRuntimeName)();
1069  // Trust level for WinRT otherwise nullptr
1070  int (__stdcall *__getTrustLevel)();
1071  // Factory cache, group id data members
1073  const __wchar_t* __serverName;
1074 };
1075 
1076 // Section r is used to put WinRT objects to creator map
1077 #pragma section("minATL$__r", read)
1078 
1079 __declspec(noreturn) inline void __stdcall __abi_WinRTraiseException(long __hrArg)
1080 {
1081  switch (__hrArg)
1082  {
1083  case 0x80004001L: // E_NOTIMPL
1084  __abi_WinRTraiseNotImplementedException();
1085 
1086  case 0x80004002L: // E_NOINTERFACE
1087  __abi_WinRTraiseInvalidCastException();
1088 
1089  case 0x80004003L: // E_POINTER
1090  __abi_WinRTraiseNullReferenceException();
1091 
1092  case 0x80004004L: // E_ABORT
1093  __abi_WinRTraiseOperationCanceledException();
1094 
1095  case 0x80004005L: // E_FAIL
1096  __abi_WinRTraiseFailureException();
1097 
1098  case 0x80070005L: // E_ACCESSDENIED
1099  __abi_WinRTraiseAccessDeniedException();
1100 
1101  case 0x8007000EL: // E_OUTOFMEMORY
1102  __abi_WinRTraiseOutOfMemoryException();
1103 
1104  case 0x80070057L: // E_INVALIDARG
1105  __abi_WinRTraiseInvalidArgumentException();
1106 
1107  case 0x8000000BL: // E_BOUNDS
1108  __abi_WinRTraiseOutOfBoundsException();
1109 
1110  case 0x8000000CL: // E_CHANGED_STATE
1111  __abi_WinRTraiseChangedStateException();
1112 
1113  case 0x80040154L: // REGDB_E_CLASSNOTREG
1114  __abi_WinRTraiseClassNotRegisteredException();
1115 
1116  case 0x8001010EL: // RPC_E_WRONG_THREAD
1117  __abi_WinRTraiseWrongThreadException();
1118 
1119  case 0x80010108L: // RPC_E_DISCONNECTED
1120  __abi_WinRTraiseDisconnectedException();
1121 
1122  case 0x80000013L: // RO_E_CLOSED
1123  __abi_WinRTraiseObjectDisposedException();
1124 
1125  default:
1126  __abi_WinRTraiseCOMException(__hrArg);
1127  break;
1128  }
1129 }
1130 
1131 __declspec(non_user_code)
1132  ::Platform::String^ __abi_winrt_CreateSystemStringFromLiteral(const __wchar_t*);
1133 __declspec(non_user_code)
1134  ::Platform::String^ __abi_winrt_CreateSystemStringFromLiteral(const unsigned short*);
1135 
1136 #if defined(VCWINRT_DLL)
1137 #define __Platform_CoCreateFreeThreadedMarshaler(__punkOuter, __ppunkMarshal) CoCreateFreeThreadedMarshaler(reinterpret_cast<IUnknown*>(__punkOuter), reinterpret_cast<IUnknown**>(__ppunkMarshal))
1138 #endif
1139 
1140 #if defined(VCWINRT_DLL)
1141 #define __Platform_CoCreateFreeThreadedMarshaler(__punkOuter, __ppunkMarshal) CoCreateFreeThreadedMarshaler(reinterpret_cast<IUnknown*>(__punkOuter), reinterpret_cast<IUnknown**>(__ppunkMarshal))
1142 #endif
1143 
1144 // Postconditions: * ParsingInitTypes is cleared
1145 #pragma initialize_winrt_types_phase3
1146 
1147 #pragma region Define Common EnumResourceTypes
1148 // Define common types if not building vccorlib.dll
1149 #if !defined(VCWINRT_DLL)
1150 
1151 // Function decleration for types we use from Windows and CRT
1152 // This prevents pulling in the headers
1153 extern "C"
1154 {
1155  long __stdcall __Platform_WindowsCreateString(const ::default::char16*, unsigned int, __abi_HSTRING*);
1158  const ::default::char16* __stdcall __Platform_WindowsGetStringRawBuffer(__abi_HSTRING, unsigned int*);
1159  unsigned int __stdcall __Platform_WindowsGetStringLen(__abi_HSTRING);
1163  long __stdcall __Platform_WindowsCreateStringReference(const ::default::char16*, unsigned int, __Platform_Details_HSTRING_HEADER*, __abi_HSTRING*);
1165  void* __stdcall __Platform_CoTaskMemAlloc(size_t);
1166  void __stdcall __Platform_CoTaskMemFree(void*);
1167  size_t __cdecl __Platform_wcslen(const ::default::char16 *);
1168  void * __cdecl __Platform_memset(void *, int, size_t);
1169 }
1170 #else // VCWINRT_DLL
1171 #define __Platform_WindowsCreateString WindowsCreateString
1172 #define __Platform_WindowsDeleteString WindowsDeleteString
1173 #define __Platform_WindowsDuplicateString WindowsDuplicateString
1174 #define __Platform_WindowsGetStringRawBuffer WindowsGetStringRawBuffer
1175 #define __Platform_WindowsGetStringLen WindowsGetStringLen
1176 #define __Platform_WindowsIsStringEmpty WindowsIsStringEmpty
1177 #define __Platform_WindowsStringHasEmbeddedNull WindowsStringHasEmbeddedNull
1178 #define __Platform_WindowsCompareStringOrdinal WindowsCompareStringOrdinal
1179 #define __Platform_WindowsCreateStringReference WindowsCreateStringReference
1180 #define __Platform_WindowsConcatString WindowsConcatString
1181 #define __Platform_CoTaskMemAlloc CoTaskMemAlloc
1182 #define __Platform_CoTaskMemFree CoTaskMemFree
1183 
1184 #define __Platform_wcslen wcslen
1185 #define __Platform_memset memset
1186 
1187 #endif // VCWINRT_DLL
1188 
1189 #pragma endregion
1190 
1191 #pragma region String^ helpers
1192 namespace Platform
1193 {
1194  // Convert failure HRESULT from Windows String API's to Exception
1195  namespace Details
1196  {
1197  inline void CreateString(const ::default::char16* __bufferArg, unsigned int __lengthArg, __abi_HSTRING* __destArg)
1198  {
1199  __abi_ThrowIfFailed( __Platform_WindowsCreateString((const ::default::char16 *)__bufferArg, __lengthArg, __destArg) );
1200  }
1201 
1202  inline void CreateString(const ::default::char16* __sourceStringArg, __abi_HSTRING* __destArg)
1203  {
1204  __abi_ThrowIfFailed( __Platform_WindowsCreateString((const ::default::char16 *)__sourceStringArg, __sourceStringArg ? static_cast<unsigned int>(__Platform_wcslen((const ::default::char16 *)__sourceStringArg)) : 0u, __destArg) );
1205  }
1206 
1207  inline void DuplicateString(__abi_HSTRING __sourceArg, __abi_HSTRING* __destArg)
1208  {
1209  if (__sourceArg == nullptr)
1210  {
1211  *__destArg = __sourceArg;
1212  return;
1213  }
1214 
1215  __abi_ThrowIfFailed( __Platform_WindowsDuplicateString(__sourceArg, __destArg) );
1216  }
1217 
1218  inline void CreateStringReference(const ::default::char16* __sourceStringArg, unsigned int __lengthArg, __Platform_Details_HSTRING_HEADER* __hstringHeaderArg, __abi_HSTRING* __stringArg)
1219  {
1220  __abi_ThrowIfFailed(__Platform_WindowsCreateStringReference(__sourceStringArg, __lengthArg, __hstringHeaderArg, __stringArg));
1221  }
1222  } // namepsace Details
1223 
1224  // StringReference is used to hold onto a fast pass HSTRING.
1226  {
1227  public:
1229  {
1230  Free();
1231  }
1233  {
1234  Init();
1235  }
1237  {
1238  Init(__fstrArg);
1239  }
1241  {
1242  if(this != &__fstrArg)
1243  {
1244  Free();
1245  Init(__fstrArg);
1246  }
1247  return *this;
1248  }
1249 
1250  StringReference(const ::default::char16* __strArg)
1251  {
1252  Init(__strArg, __Platform_wcslen(__strArg));
1253  }
1254  StringReference& operator=(const ::default::char16* __strArg)
1255  {
1256  Free();
1257  Init(__strArg, __Platform_wcslen(__strArg));
1258  return *this;
1259  }
1260  StringReference(const ::default::char16* __strArg, size_t __lenArg)
1261  {
1262  Init(__strArg, __lenArg);
1263  }
1264 
1265  const ::default::char16 * Data() const
1266  {
1268  }
1269  unsigned int Length() const
1270  {
1272  }
1273 
1274  __declspec(no_release_return) __declspec(no_refcount)
1275  operator ::Platform::String^() const
1276  {
1277  return reinterpret_cast< ::Platform::String^>(__hString);
1278  }
1279  __declspec(no_release_return) __declspec(no_refcount)
1280  ::Platform::String^ GetString() const
1281  {
1282  return reinterpret_cast< ::Platform::String^>(__hString);
1283  }
1285  {
1286  return __hString;
1287  }
1288  private:
1289  void Free()
1290  {
1292  }
1293  void Init()
1294  {
1295  __Platform_memset(this, 0, sizeof(StringReference));
1296  }
1297  void Init(const StringReference& __fstrArg)
1298  {
1299  unsigned int __length = 0;
1300  const ::default::char16* __source = __Platform_WindowsGetStringRawBuffer(__fstrArg.GetHSTRING(), &__length);
1301  Init(__source, __length);
1302  }
1303  void Init(const ::default::char16* __strArg, unsigned __int64 __lenArg)
1304  {
1305  if ((__strArg == nullptr) || (__lenArg == 0))
1306  Init();
1307  else if (__lenArg > 0xffffffffLL) // check if it exceeds the size of an integer
1308  __abi_WinRTraiseInvalidArgumentException();
1309  else
1310  {
1311  unsigned int __length = (unsigned int) (__lenArg & 0xffffffffLL);
1313  }
1314  }
1315  void Init(const ::default::char16* __strArg, unsigned int __lenArg)
1316  {
1317  if ((__strArg == nullptr) || (__lenArg == 0))
1318  Init();
1319  else
1320  {
1322  }
1323  }
1324 
1325  __Platform_Details_HSTRING_HEADER __header;
1327  };
1328 } // namespace Platform
1329 
1330 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
1331  inline void* __abi_winrt_ptrto_string_ctor(const volatile ::Platform::String ^__strArg)
1332 {
1333  if (__strArg)
1334  {
1335  __abi_HSTRING __hstr;
1336  auto __pRaw = reinterpret_cast<__abi_HSTRING>((const_cast< ::Platform::String^>(__strArg)));
1338  return __hstr;
1339  }
1340  return nullptr;
1341 }
1342 
1343 __declspec(non_user_code) __declspec(no_refcount) __declspec(no_release_return)
1344  inline void* __abi_winrt_ptrto_string_assign(void** __ppTargetArg, const volatile ::Platform::String ^__pSourceArg)
1345 {
1346  auto __pRaw = reinterpret_cast<__abi_HSTRING>((const_cast< ::Platform::String^>(__pSourceArg)));
1347  if ( *__ppTargetArg != reinterpret_cast<void*>(__pRaw) )
1348  {
1349  if (*__ppTargetArg)
1350  {
1351  __abi_details::__abi_delete_String(reinterpret_cast< ::Platform::String^>(*__ppTargetArg));
1352  }
1353  *__ppTargetArg = nullptr;
1354  if (__pSourceArg)
1355  {
1356  __abi_HSTRING __hstr;
1358  *__ppTargetArg = __hstr;
1359  }
1360  }
1361  return *__ppTargetArg;
1362 }
1363 
1364 namespace __abi_details
1365 {
1366 
1367  __declspec(non_user_code) __declspec(no_refcount)
1368  inline void __abi_delete_String(::Platform::String^ __strArg)
1369  {
1370  __Platform_WindowsDeleteString(reinterpret_cast<__abi_HSTRING>(__strArg));
1371  }
1372 
1373 } // namespace __abi_details
1374 
1375 #pragma endregion
1376 
1377 
1379 {
1380  const __wchar_t* __typeName;
1382 };
1383 
1384 #if !defined(VCWINRT_DLL)
1385 __declspec(dllimport) ::Platform::Type^ __stdcall __abi_make_type_id(const __abi_type_descriptor&);
1386 #else
1387 __declspec(dllexport) ::Platform::Type^ __stdcall __abi_make_type_id(const __abi_type_descriptor&);
1388 #endif
1389 
1390 inline Platform::String^ __abi_CustomToString(void*)
1391 {
1392  return nullptr;
1393 }
1394 
1395 namespace Platform
1396 {
1397  namespace Details
1398  {
1399  void __cdecl ReportUnhandledError( ::Platform::Exception^);
1400 
1401  __declspec(dllexport) long __stdcall ReCreateFromException(::Platform::Exception^);
1402  __declspec(dllexport) ::Platform::Object^ __stdcall CreateValue(::Platform::TypeCode, const void*);
1403  __declspec(dllexport) void* __stdcall GetIBoxArrayVtable(void*);
1404  __declspec(dllexport) void* __stdcall GetIBoxVtable(void*);
1405 
1406  template<typename T>
1407  ref class
1408  __declspec(no_empty_identity_interface)
1409  CustomBox sealed :
1410  public [::Windows::Foundation::Metadata::Default] [::Platform::Metadata::RuntimeClassName] ::Platform::IBox<T>,
1411  public ::Platform::Details::IPrintable
1412  {
1413  T value_;
1414  public:
1415  CustomBox(T value) : value_(value)
1416  {
1417  *reinterpret_cast<void**>(static_cast< ::Platform::IValueType^>(this)) =
1418  GetIBoxVtable(reinterpret_cast<void*>(static_cast< ::Platform::IBox<T>^>(this)));
1419  }
1420 
1421  virtual property T Value
1422  {
1423  T get()
1424  {
1425  return value_;
1426  }
1427  }
1428 
1429  virtual Platform::String^ ToString()
1430  {
1431  return ToStringInternal<__is_enum(T)>();
1432  }
1433 
1434  private:
1435  template<bool isEnum>
1436  Platform::String^ ToStringInternal();
1437 
1438  template<>
1439  Platform::String^ ToStringInternal<true>()
1440  {
1441  String^ s = ::__abi_CustomToString(&value_);
1442  if (s)
1443  {
1444  return s;
1445  }
1446  return T::typeid->FullName;
1447  }
1448 
1449  template<>
1450  Platform::String^ ToStringInternal<false>()
1451  {
1452  return ::__abi_details::__abi_ObjectToString(this, false);
1453  }
1454  };
1455 
1456  ref class CustomValueType : public ::Platform::ValueType
1457  {
1458  };
1459 
1460  ref class CustomEnum : public ::Platform::Enum
1461  {
1462  };
1463 
1464  template<bool __isEnum>
1466  {
1468  };
1469 
1470  template<>
1472  {
1473  typedef CustomEnum Type;
1474  };
1475 
1476  template<typename __TArg>
1478  {
1479  typedef __TArg Type;
1480  };
1481 
1482  template<typename __TArg>
1483  struct RemoveConst<const __TArg>
1484  {
1485  typedef __TArg Type;
1486  };
1487 
1488  template<typename __TArg>
1490  {
1491  typedef __TArg Type;
1492  };
1493 
1494  template<typename __TArg>
1495  struct RemoveVolatile<volatile __TArg>
1496  {
1497  typedef __TArg Type;
1498  };
1499 
1500  template<typename __TArg>
1501  struct RemoveCV
1502  {
1504  };
1505 
1506  template<typename __TArg, typename __TArg2>
1507  struct IsSame
1508  {
1509  static const bool value = false;
1510  };
1511 
1512  template<typename __TArg>
1513  struct IsSame<__TArg, __TArg>
1514  {
1515  static const bool value = true;
1516  };
1517 
1518  template <typename T>
1519  struct RemoveHat
1520  {
1521  typedef T type;
1522  };
1523  template <typename T>
1524  struct RemoveHat<T^>
1525  {
1526  typedef T type;
1527  };
1528  } // namespace Details
1529 
1530  template<typename __TArg>
1531  ref class
1532  __declspec(one_phase_constructed)
1533  __declspec(layout_as_external)
1534  __declspec(no_empty_identity_interface)
1535  Box abstract :
1536  public ::Platform::IBox<typename ::Platform::Details::RemoveCV<__TArg>::Type>,
1537  public Details::BoxValueType<__is_enum(__TArg)>::Type
1538  {
1539  static_assert(__is_enum(__TArg) ||
1540  ::Platform::Details::IsSame<typename ::Platform::Details::RemoveCV<__TArg>::Type, ::Platform::String^>::value ||
1541  __is_value_class(__TArg) ||
1542  __is_trivial(__TArg), "__TArg type of Box<__TArg> must be either value, enum or Platform::String^ type");
1543 
1544  typedef typename ::Platform::Details::RemoveCV<__TArg>::Type __TBoxValue;
1545  internal:
1546  Box(__TBoxValue __valueArg)
1547  {
1548  static auto __typeCode = ::Platform::Type::GetTypeCode(::Platform::Details::RemoveHat<__TBoxValue>::type::typeid);
1549  ::Platform::Object ^__boxValue = Details::CreateValue(__typeCode, &__valueArg);
1550  if (__boxValue == nullptr)
1551  {
1552  __boxValue = ref new Details::CustomBox<__TBoxValue>(__valueArg);
1553  return reinterpret_cast<Box^>(__boxValue);
1554  }
1555 
1556  return dynamic_cast<Box^>(__boxValue);
1557  }
1558 
1559  operator __TBoxValue()
1560  {
1561  if (this == nullptr)
1562  {
1563  throw ref new ::Platform::NullReferenceException();
1564  }
1565 
1566  return safe_cast< ::Platform::IBox<__TBoxValue>^>(this)->Value;
1567  }
1568 
1569  operator Box<const __TBoxValue>^()
1570  {
1571  return reinterpret_cast<Box<const __TBoxValue>^>(this);
1572  }
1573 
1574  operator Box<volatile __TBoxValue>^()
1575  {
1576  return reinterpret_cast<Box<volatile __TBoxValue>^>(this);
1577  }
1578 
1579  operator Box<const volatile __TBoxValue>^()
1580  {
1581  return reinterpret_cast<Box<const volatile __TBoxValue>^>(this);
1582  }
1583 
1584  static operator Box<__TArg>^( ::Platform::IBox<__TArg>^ __boxValueArg)
1585  {
1586  return reinterpret_cast<Box<__TArg>^>(__boxValueArg);
1587  }
1588 
1589  public:
1590  virtual property __TBoxValue Value
1591  {
1592  __TBoxValue get()
1593  {
1594  if (this == nullptr)
1595  {
1596  throw ref new ::Platform::NullReferenceException();
1597  }
1598 
1599  return safe_cast< ::Platform::IBox<__TBoxValue>^>(this)->Value;
1600  }
1601  }
1602  };
1603 
1604 
1606  inline Guid::Guid() : __a(0), __b(0), __c(0), __d(0), __e(0), __f(0), __g(0), __h(0), __i(0), __j(0), __k(0)
1607  {
1608  }
1609 
1610  inline Guid::Guid(__rcGUID_t __guid) :
1611  __a(reinterpret_cast<const __s_GUID&>(__guid).Data1),
1612  __b(reinterpret_cast<const __s_GUID&>(__guid).Data2),
1613  __c(reinterpret_cast<const __s_GUID&>(__guid).Data3),
1614  __d(reinterpret_cast<const __s_GUID&>(__guid).Data4[0]),
1615  __e(reinterpret_cast<const __s_GUID&>(__guid).Data4[1]),
1616  __f(reinterpret_cast<const __s_GUID&>(__guid).Data4[2]),
1617  __g(reinterpret_cast<const __s_GUID&>(__guid).Data4[3]),
1618  __h(reinterpret_cast<const __s_GUID&>(__guid).Data4[4]),
1619  __i(reinterpret_cast<const __s_GUID&>(__guid).Data4[5]),
1620  __j(reinterpret_cast<const __s_GUID&>(__guid).Data4[6]),
1621  __k(reinterpret_cast<const __s_GUID&>(__guid).Data4[7])
1622  {
1623  }
1624 
1625  inline Guid::operator ::__rcGUID_t()
1626  {
1627  return reinterpret_cast<__rcGUID_t>(*this);
1628  }
1629 
1630  inline bool ::Platform::Guid::Equals(::Platform::Guid __guidArg)
1631  {
1632  auto __al = reinterpret_cast<const unsigned long*>(this);
1633  auto __bl = reinterpret_cast<const unsigned long*>(&__guidArg);
1634 
1635  return (__al[0] == __bl[0] && __al[1] == __bl[1] && __al[2] == __bl[2] && __al[3] == __bl[3]);
1636  }
1637 
1638  inline bool ::Platform::Guid::Equals(__rcGUID_t __guidArg)
1639  {
1640  auto __al = reinterpret_cast<const unsigned long*>(this);
1641  auto __bl = reinterpret_cast<const unsigned long*>(&__guidArg);
1642 
1643  return (__al[0] == __bl[0] && __al[1] == __bl[1] && __al[2] == __bl[2] && __al[3] == __bl[3]);
1644  }
1645 
1646  inline bool ::Platform::Guid::operator==(::Platform::Guid __aArg, ::Platform::Guid __bArg)
1647  {
1648  auto __al = reinterpret_cast<const unsigned long*>(&__aArg);
1649  auto __bl = reinterpret_cast<const unsigned long*>(&__bArg);
1650 
1651  return (__al[0] == __bl[0] && __al[1] == __bl[1] && __al[2] == __bl[2] && __al[3] == __bl[3]);
1652  }
1653 
1654  inline bool ::Platform::Guid::operator!=(::Platform::Guid __aArg, ::Platform::Guid __bArg)
1655  {
1656  return !(__aArg == __bArg);
1657  }
1658 
1659  inline bool ::Platform::Guid::operator<(::Platform::Guid __aArg, ::Platform::Guid __bArg)
1660  {
1661  auto __al = reinterpret_cast<const unsigned long*>(&__aArg);
1662  auto __bl = reinterpret_cast<const unsigned long*>(&__bArg);
1663 
1664  if (__al[0] != __bl[0])
1665  {
1666  return __al[0] < __bl[0];
1667  }
1668 
1669  if (__al[1] != __bl[1])
1670  {
1671  return __al[1] < __bl[1];
1672  }
1673 
1674  if (__al[2] != __bl[2])
1675  {
1676  return __al[2] < __bl[2];
1677  }
1678 
1679  if (__al[3] != __bl[3])
1680  {
1681  return __al[3] < __bl[3];
1682  }
1683 
1684  return false;
1685  }
1686 
1687  inline Guid::Guid(unsigned int __aArg, unsigned short __bArg, unsigned short __cArg, unsigned __int8 __dArg,
1688  unsigned __int8 __eArg, unsigned __int8 __fArg, unsigned __int8 __gArg, unsigned __int8 __hArg,
1689  unsigned __int8 __iArg, unsigned __int8 __jArg, unsigned __int8 __kArg) :
1690  __a(__aArg), __b(__bArg), __c(__cArg), __d(__dArg), __e(__eArg), __f(__fArg), __g(__gArg), __h(__hArg), __i(__iArg), __j(__jArg), __k(__kArg)
1691  {
1692  }
1693 
1694  inline Guid::Guid(unsigned int __aArg, unsigned short __bArg, unsigned short __cArg, const ::Platform::Array<unsigned __int8>^ __dArg) :
1695  __a(__aArg), __b(__bArg), __c(__cArg)
1696  {
1697  if (__dArg == nullptr || __dArg->Length != 8)
1698  {
1699  __abi_WinRTraiseInvalidArgumentException();
1700  }
1701  __d = __dArg[0];
1702  __e = __dArg[1];
1703  __f = __dArg[2];
1704  __g = __dArg[3];
1705  __h = __dArg[4];
1706  __i = __dArg[5];
1707  __j = __dArg[6];
1708  __k = __dArg[7];
1709  }
1710 
1711  __declspec(selectany) ::Platform::Guid __winrt_GUID_NULL = {0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1712 
1714  inline void* Details::Heap::Allocate(::Platform::SizeT /*__sizeArg*/, void* __pPlacementArg)
1715  {
1716  return __pPlacementArg;
1717  }
1718 
1719  inline void* Details::Heap::Allocate(::Platform::SizeT /*__rcOffset*/, ::Platform::SizeT /*__sizeArg*/, void* __pPlacementArg)
1720  {
1721  return __pPlacementArg;
1722  }
1723 
1724  inline void Details::Heap::PlacementFree(void* /*__pArg*/, void* /*__placementArg*/)
1725  {
1726  }
1727 } // namespace Platform
1728 
1729 template <typename __TArg>
1730 Platform::Box<typename ::Platform::Details::RemoveCV<__TArg>::Type>^ __abi_create_box(__TArg __boxValueArg)
1731 {
1732  return ref new ::Platform::Box<__TArg>(__boxValueArg);
1733 }
1734 
1735 template <typename __TArg>
1736 __TArg __abi_unbox(::Platform::Object^ __objArg)
1737 {
1738  return safe_cast< ::Platform::Box<__TArg>^>(__objArg);
1739 }
1740 
1741 template<typename T>
1742 __declspec(non_user_code)
1743  inline T^ __abi_winrt_cast_from_object_to_delegate(bool __isDynamicCastArg, ::Platform::Object^ __objArg)
1744 {
1745  if (__objArg == nullptr) {
1746  return nullptr;
1747  }
1748 
1749  auto __p(dynamic_cast< ::Platform::Details::CustomBox<T^> ^>(__objArg));
1750  if (__p == nullptr) {
1751  if (__isDynamicCastArg) {
1752  return nullptr;
1753  }
1754 
1755  __abi_WinRTraiseInvalidCastException();
1756  } else {
1757  return __p->Value;
1758  }
1759 }
1760 
1761 template<typename T>
1762 __declspec(non_user_code) __declspec(no_refcount)
1763  inline ::Platform::Object^ __abi_winrt_cast_from_delegate_to_object(bool /*__isDynamicCastArg*/, T^ __objArg)
1764 {
1765  if (__objArg == nullptr) {
1766  return nullptr;
1767  } else {
1768  return ref new ::Platform::Details::CustomBox<T^>(__objArg);
1769  }
1770 }
1771 
1772 inline long __stdcall __abi_FTMWeakRefData::__abi_QueryInterface(::Platform::Guid& __guid, void** __pOut)
1773 {
1774  if (__pUnkMarshal == nullptr || __guid.Equals(__uuidof(__abi_IMarshal)) == false)
1775  {
1776  return 0x80004002;
1777  }
1778  if (__pUnkMarshal == reinterpret_cast<__abi_IUnknown*>(-1))
1779  {
1780  __abi_IUnknown* __pUnkMarshalLocal;
1781 
1782 #if !defined(VCWINRT_DLL)
1783  long __hr = ::__Platform_CoCreateFreeThreadedMarshaler(reinterpret_cast<::Platform::Object^>(__weakRefSource->__target), reinterpret_cast< ::Platform::Object^*>(&__pUnkMarshalLocal));
1784 #else
1785  long __hr = ::CoCreateFreeThreadedMarshaler(reinterpret_cast<IUnknown*>(__weakRefSource->__target), reinterpret_cast<IUnknown**>(&__pUnkMarshalLocal));
1786 #endif
1787  __abi_ThrowIfFailed(__hr);
1788 
1789  if (::_InterlockedCompareExchangePointer(reinterpret_cast<void* volatile*>(&__pUnkMarshal), __pUnkMarshalLocal, reinterpret_cast<void*>(-1)) != reinterpret_cast<void*>(-1))
1790  {
1791  __pUnkMarshalLocal->__abi_Release();
1792  }
1793  }
1794  return __pUnkMarshal->__abi_QueryInterface(__guid, __pOut);
1795 }
1796 
1797 inline long __stdcall ::Platform::Details::ControlBlock::__abi_QueryInterface(::Platform::Guid& __riid, void** __ppvObject)
1798 {
1799  if (__riid.Equals(__uuidof(__abi_IUnknown)) ||
1800  __riid.Equals(__uuidof(__abi_IWeakReference)))
1801  {
1802  __abi_AddRef();
1803  *__ppvObject = this;
1804  return 0;
1805  }
1806  *__ppvObject = nullptr;
1807  return 0x80004002;
1808 }
1809 
1810 #pragma region String
1811 #pragma region String^ API
1812 
1813 namespace Platform
1814 {
1815 #if !defined(_PREFIX_) && !defined(_PREFAST_)
1816 
1817  __declspec(no_refcount)
1818  __declspec(no_release_return)
1819  inline String::String()
1820  {
1821  return nullptr;
1822  }
1823 
1824  __declspec(no_refcount)
1825  inline String::String(__abi_HSTRING __hstrArg)
1826  {
1827  __abi_HSTRING __hstr;
1828  Details::DuplicateString(__hstrArg, &__hstr);
1829  return *reinterpret_cast<String^*>(&__hstr);
1830  }
1831 
1832  __declspec(no_refcount)
1833  inline String::String(const ::default::char16* __strArg)
1834  {
1835  if (__strArg == nullptr)
1836  return nullptr;
1837 
1838  __abi_HSTRING __hstr = nullptr;
1839  ::Platform::Details::CreateString(__strArg, (unsigned int)__Platform_wcslen(__strArg), &__hstr);
1840  return *reinterpret_cast<String^*>(&__hstr);
1841  }
1842 
1843  __declspec(no_refcount)
1844  inline String::String(const ::default::char16* __strArg, unsigned int __lenArg)
1845  {
1846  if ((__strArg == nullptr) || (__lenArg == 0))
1847  return nullptr;
1848 
1849  __abi_HSTRING __hstr = nullptr;
1850  ::Platform::Details::CreateString(__strArg, __lenArg, &__hstr);
1851  return *reinterpret_cast<String^*>(&__hstr);
1852  }
1853 
1854 #endif // !defined(_PREFIX_) && !defined(_PREFAST_)
1855 
1856  inline const ::default::char16* String::Begin()
1857  {
1858  return Data();
1859  }
1860  inline const ::default::char16* String::End()
1861  {
1862  return Data() + Length();
1863  }
1864 
1865  inline Platform::String^ Object::ToString()
1866  {
1867  return ::__abi_details::__abi_ObjectToString(this, true);
1868  }
1869 
1870  inline const ::default::char16 * String::Data()
1871  {
1872  return __Platform_WindowsGetStringRawBuffer(reinterpret_cast<__abi_HSTRING>(this), nullptr);
1873  }
1874 
1875  inline unsigned int String::Length()
1876  {
1877  return __Platform_WindowsGetStringLen(reinterpret_cast<__abi_HSTRING>(this));
1878  }
1879  inline bool String::IsEmpty()
1880  {
1881  return __Platform_WindowsIsStringEmpty(reinterpret_cast<__abi_HSTRING>(this)) ? true : false;
1882  }
1883 
1884  inline bool String::IsFastPass()
1885  {
1886  return false;
1887  }
1888 
1889  inline bool String::Equals(Object^ __strArg)
1890  {
1891  int __result = 0;
1892  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(this), reinterpret_cast<__abi_HSTRING>(((String^)__strArg)), &__result);
1893  return (__result == 0);
1894  }
1895 
1896  inline bool String::Equals(String^ __str1Arg)
1897  {
1898  int __result = 0;
1899  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(this), reinterpret_cast<__abi_HSTRING>(__str1Arg), &__result);
1900  return (__result == 0);
1901  }
1902  inline int String::CompareOrdinal(String^ __str1Arg, String^ __str2Arg)
1903  {
1904  int __result = 0;
1905  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1906  return __result;
1907  }
1908  inline int String::GetHashCode()
1909  {
1910  int __hash = 0;
1911  for (auto i = Begin(); i != End(); ++i)
1912  __hash += *i;
1913  return __hash;
1914  }
1915 
1916  inline bool ::Platform::String::operator==(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1917  {
1918  int __result = 0;
1919  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1920  return (__result == 0);
1921  }
1922 
1923  inline bool ::Platform::String::operator!=(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1924  {
1925  int __result = 0;
1926  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1927  return (__result != 0);
1928  }
1929 
1930  inline bool ::Platform::String::operator<(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1931  {
1932  int __result = 0;
1933  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1934  return (__result < 0);
1935  }
1936 
1937  inline bool ::Platform::String::operator>(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1938  {
1939  int __result = 0;
1940  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1941  return (__result > 0);
1942  }
1943 
1944  inline bool ::Platform::String::operator<=(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1945  {
1946  int __result = 0;
1947  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1948  return (__result <= 0);
1949  }
1950 
1951  inline bool ::Platform::String::operator>=(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1952  {
1953  int __result = 0;
1954  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1955  return (__result >= 0);
1956  }
1957 
1958  inline ::Platform::String ^ ::Platform::String::Concat(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1959  {
1960  String^ __str = nullptr;
1961  __abi_ThrowIfFailed(__Platform_WindowsConcatString(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), reinterpret_cast<__abi_HSTRING*>(&__str)));
1962  return __str;
1963  }
1964 
1965  inline ::Platform::String ^ ::Platform::String::Concat(::Platform::Object^ __str1Arg, ::Platform::Object^ __str2Arg)
1966  {
1967  String^ __str = nullptr;
1968 #pragma warning (suppress:6011) // False positive because __str?Arg not evaluated
1969  __abi_ThrowIfFailed(__Platform_WindowsConcatString(reinterpret_cast<__abi_HSTRING>(__str1Arg->ToString()), reinterpret_cast<__abi_HSTRING>(__str2Arg->ToString()), reinterpret_cast<__abi_HSTRING*>(&__str)));
1970  return __str;
1971  }
1972 
1973  inline String^ String::ToString()
1974  {
1975  return ref new ::Platform::String(Data());
1976  }
1977 
1978 #pragma region string iterators
1979  inline const ::default::char16 * begin(::Platform::String^ __strArg)
1980  {
1981  return __strArg->Begin();
1982  }
1983 
1984  inline const ::default::char16 * end(::Platform::String^ __strArg)
1985  {
1986  return __strArg->End();
1987  }
1988 #pragma endregion
1989 } // namespace Platform
1990 #pragma endregion
1991 
1992 __declspec(non_user_code)
1993  inline ::Platform::String^ __abi_winrt_CreateSystemStringFromLiteral(const ::default::char16* __strArg)
1994 {
1995  return ref new ::Platform::String(__strArg);
1996 }
1997 
1998 template<typename __TArg>
1999 inline ::Platform::Array<__TArg, 1>^ __abi_winrt_CreateArray(unsigned int __sizeArg)
2000 {
2001  return ref new ::Platform::Array<__TArg, 1>(__sizeArg);
2002 }
2003 
2004 inline __declspec(no_refcount) __declspec(no_release_return) ::Platform::String^ __abi_winrt_CreateFastPassSystemStringFromLiteral(const ::default::char16* __strArg, unsigned int __lenArg, __Platform_Details_HSTRING_HEADER* __psheaderArg)
2005 {
2006  __abi_HSTRING __hstr;
2007  ::Platform::Details::CreateStringReference(__strArg, __lenArg, __psheaderArg, &__hstr);
2008  return *reinterpret_cast< ::Platform::String^*>(&__hstr);
2009 }
2010 
2011 inline __declspec(no_refcount) __declspec(no_release_return) ::Platform::String^ __abi_winrt_CreateFastPassSystemStringFromLiteral(const unsigned short* __strArg, unsigned int __lenArg, __Platform_Details_HSTRING_HEADER* __psheaderArg)
2012 {
2013  return __abi_winrt_CreateFastPassSystemStringFromLiteral(reinterpret_cast<const ::default::char16*>(__strArg), __lenArg, __psheaderArg);
2014 }
2015 
2016 #pragma endregion
2017 
2018 #pragma region Array
2019 
2020 namespace Platform
2021 {
2022  namespace Details
2023  {
2024  // Attach to the external buffer
2025  template <typename __HighLevelType, unsigned int __dimension>
2026  __declspec(no_refcount) ::Platform::Array<__HighLevelType, __dimension>^ __abi_array_attach(void* __srcArg, unsigned int __elementcountArg, bool __isFastPassArg, bool __needsInitArg)
2027  {
2028  if (static_cast<unsigned int>(-1) / sizeof(__HighLevelType) < __elementcountArg)
2029  {
2030  __abi_WinRTraiseInvalidArgumentException();
2031  }
2032  auto __arr = ref new ::Platform::Array<__HighLevelType, __dimension>(nullptr, 0);
2033 
2034  if (__needsInitArg)
2035  {
2036  __Platform_memset(__srcArg, 0, sizeof(__HighLevelType) * __elementcountArg);
2037  }
2038  if (!__isFastPassArg)
2039  {
2040  __arr->Attach(reinterpret_cast<__HighLevelType*>(__srcArg), __elementcountArg);
2041  }
2042  else
2043  {
2044  __arr->AttachFastPass(reinterpret_cast<__HighLevelType*>(__srcArg), __elementcountArg);
2045  }
2046 
2047  return __arr;
2048  }
2049 
2050  template <typename __HighLevelType, unsigned int __dimension>
2051  void __abi_array_copy_to_and_release(::Platform::Array<__HighLevelType, __dimension>^ __arrArg, void** __destArg, unsigned int* __sizeArg)
2052  {
2053  if (__arrArg == nullptr)
2054  {
2055  *__destArg = nullptr;
2056  *__sizeArg = 0;
2057  return;
2058  }
2059 
2060  __HighLevelType **__destHigh = reinterpret_cast<__HighLevelType **>(__destArg);
2061  __arrArg->CopyToOrDetach(__destHigh, __sizeArg);
2062 
2063  // __arrArg is a local variable declared in a wrapper marked with no_refcount
2064  // This function is called from that function, have to release the Array^
2065  reinterpret_cast<__abi_IUnknown*>(static_cast< ::Platform::Object^>(__arrArg))->__abi_Release();
2066  // The caller will not use __arrArg after this function returns
2067  }
2068 
2069  // Convert ::Platform::Array to raw buffer
2070  // It is called when we are converting in Array from high level to low level
2071  template <typename __LowLevelType, typename __HighLevelType, unsigned int __dimension>
2072  __LowLevelType* __abi_array_to_raw(const ::Platform::Array<__HighLevelType, __dimension>^ __arrArg)
2073  {
2074  if (__arrArg == nullptr)
2075  {
2076  return nullptr;
2077  }
2078  return reinterpret_cast<__LowLevelType*>(__arrArg->Data);
2079  }
2080 
2081  template <typename __TArg>
2082  struct array_helper<__TArg, true>
2083  {
2084  static void DestructElementsAndFree(__TArg* __srcArg, unsigned int)
2085  {
2086  __Platform_CoTaskMemFree(__srcArg);
2087  }
2088  };
2089 
2090  template <typename __TArg>
2091  struct array_helper<__TArg, false>
2092  {
2093  static void DestructElementsAndFree(__TArg* __srcArg, unsigned int __countArg)
2094  {
2095  typedef __TArg typeT;
2096  for (unsigned int __i = 0; __i < __countArg; __i++)
2097  {
2098  (&__srcArg[__i])->~typeT();
2099  }
2100  __Platform_CoTaskMemFree(__srcArg);
2101  }
2102  };
2103  } // namespace Details
2104 
2105  template <typename __TArg>
2106  class ArrayReference<__TArg, 1>
2107  {
2108  default::uint8 __data[sizeof(Array<__TArg>)];
2109  void Init(__TArg* __dataArg, unsigned int __sizeArg, bool __needsInitArg = false)
2110  {
2111  __Platform_memset(__data, 0, sizeof(Array<__TArg>));
2112  ArrayReference* __pThis = this;
2113  Array<__TArg>^* __pArrayThis = reinterpret_cast<Array<__TArg>^*>(&__pThis);
2114  (*__pArrayThis)->ArrayReferenceInit();
2115 
2116  if (__needsInitArg)
2117  {
2118  if (static_cast<unsigned int>(-1) / sizeof(__TArg) < __sizeArg)
2119  {
2120  __abi_WinRTraiseInvalidArgumentException();
2121  }
2122  __Platform_memset(__dataArg, 0, sizeof(__TArg) * __sizeArg);
2123  }
2124 
2125  (*__pArrayThis)->AttachFastPass(__dataArg, __sizeArg);
2126  }
2127  public:
2128  ArrayReference(__TArg* __dataArg, unsigned int __sizeArg, bool __needsInitArg = false)
2129  {
2130  Init(__dataArg, __sizeArg, __needsInitArg);
2131  }
2132 
2134  {
2135  Array<__TArg>^* __pOther = reinterpret_cast<Array<__TArg>^*>(&__otherArg);
2136  Init((*__pOther)->__data, (*__pOther)->__size);
2137  }
2138 
2140  {
2141  Array<__TArg>^* __pOther = reinterpret_cast<Array<__TArg>^*>(&__otherArg);
2142  Init((*pOther)->__data, (*pOther)->__size);
2143  }
2144 
2145  __declspec(no_refcount) __declspec(no_release_return)
2146  operator Array<__TArg>^()
2147  {
2148  ArrayReference* __pThis = this;
2149  Array<__TArg>^* __pArrayThis = reinterpret_cast<Array<__TArg>^*>(&__pThis);
2150 
2151  return *__pArrayThis;
2152  }
2153  private:
2156  };
2157 
2158 #pragma region ::Platform::WriteOnlyArray
2159  template <typename __TArg>
2160  inline WriteOnlyArray<__TArg, 1>::WriteOnlyArray() : __size(0), __fastpassflag(false), __data(nullptr)
2161  {
2162  }
2163 
2164  template <typename __TArg>
2165  inline WriteOnlyArray<__TArg, 1>::WriteOnlyArray(unsigned int __sizeArg) : __size(0), __fastpassflag(false), __data(nullptr)
2166  {
2167  if (__sizeArg == 0)
2168  {
2169  return;
2170  }
2171  __data = AllocateAndZeroInitialize(__sizeArg);
2172  __size = __sizeArg;
2173  }
2174 
2175  template <typename __TArg>
2176  inline WriteOnlyArray<__TArg, 1>::WriteOnlyArray(__TArg* __dataArg, unsigned int __sizeArg) : __size(0), __fastpassflag(false), __data(nullptr)
2177  {
2178  if (__sizeArg == 0)
2179  {
2180  return;
2181  }
2182  __data = AllocateAndCopyElements(__dataArg, __sizeArg);
2183  __size = __sizeArg;
2184  }
2185 
2186  template <typename __TArg>
2188  {
2189  if ((__fastpassflag == false) && (__data != nullptr))
2190  {
2192  }
2193  Clear();
2194  }
2195 
2196  template <typename __TArg>
2197  inline __TArg& WriteOnlyArray<__TArg, 1>::set(unsigned int __positionArg, __TArg __valueArg)
2198  {
2199  if (__data == nullptr)
2200  {
2201  __abi_WinRTraiseNullReferenceException();
2202  }
2203 
2204  if (__positionArg >= 0 && __positionArg < __size)
2205  {
2206  __data[__positionArg] = __valueArg;
2207  return __data[__positionArg];
2208  }
2209 
2210  __abi_WinRTraiseOutOfBoundsException();
2211  }
2212 
2213  template <typename __TArg>
2214  inline __TArg& WriteOnlyArray<__TArg, 1>::get(unsigned int __positionArg) const
2215  {
2216  if (__data == nullptr)
2217  {
2218  __abi_WinRTraiseNullReferenceException();
2219  }
2220 
2221  if (__positionArg >= 0 && __positionArg < __size)
2222  {
2223  return __data[__positionArg];
2224  }
2225 
2226  __abi_WinRTraiseOutOfBoundsException();
2227  }
2228 
2229 #if defined(_PREFIX_) || defined(_PREFAST_)
2230  template <typename __TArg>
2231  inline __TArg& WriteOnlyArray<__TArg, 1>::operator [](unsigned int __positionArg) const
2232  {
2233  if (__data == nullptr)
2234  {
2235  __abi_WinRTraiseNullReferenceException();
2236  }
2237 
2238  if (__positionArg >= 0 && __positionArg < __size)
2239  {
2240  return __data[__positionArg];
2241  }
2242 
2243  __abi_WinRTraiseOutOfBoundsException();
2244  }
2245 #endif // #if defined(_PREFIX_) || defined(_PREFAST_)
2246 
2247  template <typename __TArg>
2248  inline __TArg* WriteOnlyArray<__TArg, 1>::begin() const
2249  {
2250  if (__data == nullptr)
2251  {
2252  return nullptr;
2253  }
2254 
2255  return &(__data[0]);
2256  }
2257 
2258  template <typename __TArg>
2259  inline __TArg* WriteOnlyArray<__TArg, 1>::end() const
2260  {
2261  if (__data == nullptr)
2262  {
2263  return nullptr;
2264  }
2265 
2266  return &(__data[__size]);
2267  }
2268 
2269  template <typename __TArg>
2270  inline unsigned int WriteOnlyArray<__TArg, 1>::Length::get() const
2271  {
2272  return __size;
2273  }
2274 
2275  template <typename __TArg>
2276  inline __TArg* WriteOnlyArray<__TArg, 1>::Data::get() const
2277  {
2278  return this->begin();
2279  }
2280 
2281  template <typename __TArg>
2282  inline bool WriteOnlyArray<__TArg, 1>::FastPass::get() const
2283  {
2284  return __fastpassflag;
2285  }
2286 
2287  template <typename __TArg>
2289  {
2290  __size = 0;
2291  __fastpassflag = false;
2292  __data = nullptr;
2293  }
2294 
2295  template <typename __TArg>
2296  inline __TArg* WriteOnlyArray<__TArg, 1>::AllocateAndZeroInitialize(unsigned int __countArg)
2297  {
2298  __TArg* __dest = nullptr;
2299  if (__countArg == 0)
2300  {
2301  return __dest;
2302  }
2303 
2304  if (static_cast<unsigned int>(-1) / sizeof(__TArg) < __countArg)
2305  {
2306  __abi_WinRTraiseInvalidCastException();
2307  }
2308  __dest = (__TArg*)__Platform_CoTaskMemAlloc(__countArg * sizeof(__TArg));
2309  if (__dest == nullptr)
2310  {
2311  __abi_WinRTraiseOutOfMemoryException();
2312  }
2313 
2314  __Platform_memset(__dest, 0, __countArg * sizeof(__TArg));
2315  return __dest;
2316  }
2317 
2318  template <typename __TArg>
2319  inline __TArg* WriteOnlyArray<__TArg, 1>::AllocateAndCopyElements(const __TArg* __srcArg, unsigned int __countArg)
2320  {
2321  __TArg* __dest = AllocateAndZeroInitialize(__countArg);
2322  for (unsigned int __i = 0; __i < __countArg; ++__i)
2323  {
2324  __dest[__i] = __srcArg[__i];
2325  }
2326  return __dest;
2327  }
2328 #pragma endregion
2329 
2330 #pragma region ::Platform::Array
2331  template <typename __TArg>
2332  inline Array<__TArg, 1>::Array() : WriteOnlyArray<__TArg, 1>()
2333  {
2334  *reinterpret_cast<void**>(static_cast< ::Platform::IValueType^ >(this)) =
2335  Details::GetIBoxArrayVtable(reinterpret_cast<void*>(static_cast< ::Platform::IBoxArray<__TArg>^ >(this)));
2336  }
2337 
2338  template <typename __TArg>
2339  inline Array<__TArg, 1>::Array(const Array<__TArg, 1>^ __source) : WriteOnlyArray<__TArg, 1>(__source ? __source->Data : nullptr, __source ? __source->Length : 0)
2340  {
2341  *reinterpret_cast<void**>(static_cast< ::Platform::IValueType^ >(this)) =
2342  Details::GetIBoxArrayVtable(reinterpret_cast<void*>(static_cast< ::Platform::IBoxArray<__TArg>^ >(this)));
2343  }
2344 
2345  template <typename __TArg>
2346  inline Array<__TArg, 1>::Array(unsigned int __sizeArg) : WriteOnlyArray<__TArg, 1>(__sizeArg)
2347  {
2348  *reinterpret_cast<void**>(static_cast< ::Platform::IValueType^ >(this)) =
2349  Details::GetIBoxArrayVtable(reinterpret_cast<void*>(static_cast< ::Platform::IBoxArray<__TArg>^ >(this)));
2350  }
2351 
2352  template <typename __TArg>
2353  inline Array<__TArg, 1>::Array(__TArg* __dataArg, unsigned int __sizeArg) : WriteOnlyArray<__TArg, 1>(__dataArg, __sizeArg)
2354  {
2355  *reinterpret_cast<void**>(static_cast< ::Platform::IValueType^ >(this)) =
2356  Details::GetIBoxArrayVtable(reinterpret_cast<void*>(static_cast< ::Platform::IBoxArray<__TArg>^>(this)));
2357  }
2358 
2359  template <typename T>
2360  inline T& Array<T, 1>::get(unsigned int __positionArg) const
2361  {
2362  return WriteOnlyArray<T, 1>::get(__positionArg);
2363  }
2364 
2365 #if defined(_PREFIX_) || defined(_PREFAST_)
2366  template <typename T>
2367  inline T& Array<T, 1>::operator[](unsigned int __positionArg) const
2368  {
2369  return WriteOnlyArray<T, 1>::operator[](__positionArg);
2370  }
2371 #endif // defined(_PREFIX_) || defined(_PREFAST_)
2372 
2373  template <typename __TArg>
2374  inline Array<__TArg, 1>^ Array<__TArg, 1>::Value::get()
2375  {
2376  return this;
2377  }
2378 
2379  template <typename __TArg>
2380  inline void Array<__TArg, 1>::Attach(__TArg* __srcArg, unsigned int __sizeArg)
2381  {
2382  // Precondition:
2383  // default constructed object
2384  // Postcondition:
2385  // _data = src
2386  // _size = size
2387  // _fastpassflag = false
2388  // _refcount = 1
2389 
2390  if (__size == 0 && __data == nullptr)
2391  {
2392  __size = __sizeArg;
2393  __fastpassflag = false;
2394  __data = __srcArg;
2395  return;
2396  }
2397 
2398  __abi_WinRTraiseFailureException();
2399  }
2400 
2401  template <typename __TArg>
2402  inline void Array<__TArg, 1>::AttachFastPass(__TArg* __srcArg, unsigned int __sizeArg)
2403  {
2404  // Precondition:
2405  // default constructed object
2406  // Postcondition:
2407  // _data = src
2408  // _size = size
2409  // _fastpassflag = true
2410 
2411  if (__size == 0 && __data == nullptr)
2412  {
2413  __size = __sizeArg;
2414  __fastpassflag = true;
2415  __data = __srcArg;
2416  return;
2417  }
2418 
2419  __abi_WinRTraiseFailureException();
2420  }
2421 
2422  template <typename __TArg>
2423  inline void Array<__TArg, 1>::CopyToOrDetach(__TArg** __destArg, unsigned int* __sizeArg)
2424  {
2425  // Postcondition:
2426  // if (_refcount == 1 && !_fastpassflag)
2427  // *dest = _data
2428  // *size = _size
2429  // Clear()
2430  // if (_refcount > 1 || _fastpassflag)
2431  // *dest = new buffer with contents of _data
2432  // *size = _size
2433 
2434  if ((__destArg == nullptr) || (__sizeArg == nullptr))
2435  {
2436  __abi_WinRTraiseNullReferenceException();
2437  }
2438 
2439  if (this->__size == 0)
2440  {
2441  *__destArg = nullptr;
2442  *__sizeArg = 0;
2443  return;
2444  }
2445 
2446  if(this->__data == nullptr)
2447  {
2448  __abi_WinRTraiseFailureException();
2449  }
2450 
2451  if (!this->__fastpassflag && this->__abi_reference_count.Get() == 1)
2452  {
2453  *__destArg = this->__data;
2454  *__sizeArg = this->__size;
2455  this->Clear();
2456  }
2457  else if (this->__fastpassflag || this->__abi_reference_count.Get() > 1)
2458  {
2459  *__destArg = this->AllocateAndCopyElements(this->__data, this->__size);
2460  *__sizeArg = this->__size;
2461  }
2462  else
2463  {
2464  __abi_WinRTraiseFailureException();
2465  }
2466  }
2467 
2468 #pragma endregion
2469 
2470 #pragma region Array iterators
2471  template<class __TArg>
2472  __TArg * begin(const Array<__TArg, 1>^ __arrArg)
2473  {
2474  return __arrArg->begin();
2475  }
2476 
2477  template<class __TArg>
2478  __TArg * end(const Array<__TArg, 1>^ __arrArg)
2479  {
2480  return __arrArg->end();
2481  }
2482 #pragma endregion
2483 } // namespace Platform {
2484 #pragma endregion
2485 
2486 namespace Platform
2487 {
2488  namespace Details
2489  {
2490 #if !defined(VCWINRT_DLL)
2491  __declspec(dllimport) void __stdcall EventSourceInitialize(void**);
2492  __declspec(dllimport) void __stdcall EventSourceUninitialize(void**);
2493  __declspec(dllimport) void* __stdcall EventSourceGetTargetArray(void*, EventLock*);
2494  __declspec(dllimport) unsigned int __stdcall EventSourceGetTargetArraySize(void*);
2495  __declspec(dllimport) void* __stdcall EventSourceGetTargetArrayEvent(void*, unsigned int, const void*, __int64*);
2496  __declspec(dllimport) ::Windows::Foundation::EventRegistrationToken __stdcall EventSourceAdd(void**, EventLock*, ::Platform::Delegate^);
2497  __declspec(dllimport) void __stdcall EventSourceRemove(void**, EventLock*, ::Windows::Foundation::EventRegistrationToken);
2498  __declspec(dllimport) __abi_IUnknown* __stdcall GetWeakReference(const volatile ::Platform::Object^ const other);
2499  __declspec(dllimport) __declspec(no_refcount) ::Platform::Object^ __stdcall ResolveWeakReference(const ::_GUID& guid, __abi_IUnknown** weakRef);
2500 #else
2501  __declspec(dllexport) void __stdcall EventSourceInitialize(void**);
2502  __declspec(dllexport) void __stdcall EventSourceUninitialize(void**);
2503  __declspec(dllexport) void* __stdcall EventSourceGetTargetArray(void*, EventLock*);
2504  __declspec(dllexport) unsigned int __stdcall EventSourceGetTargetArraySize(void*);
2505  __declspec(dllexport) void* __stdcall EventSourceGetTargetArrayEvent(void*, unsigned int, const void*, __int64*);
2506  __declspec(dllexport) ::Windows::Foundation::EventRegistrationToken __stdcall EventSourceAdd(void**, EventLock*, ::Platform::Delegate^);
2507  __declspec(dllexport) void __stdcall EventSourceRemove(void**, EventLock*, ::Windows::Foundation::EventRegistrationToken);
2508  __declspec(dllexport) __abi_IUnknown* __stdcall GetWeakReference(const volatile ::Platform::Object^ const other);
2509  __declspec(dllexport) __declspec(no_refcount) ::Platform::Object^ __stdcall ResolveWeakReference(const ::_GUID& guid, __abi_IUnknown** weakRef);
2510 #endif
2511  } // Details
2512 
2514  {
2515  public:
2517  {
2518  Details::EventSourceInitialize(&__targets);
2519  }
2520 
2522  {
2523  Details::EventSourceUninitialize(&__targets);
2524  }
2525 
2526  ::Windows::Foundation::EventRegistrationToken Add(Details::EventLock* __lockArg, ::Platform::Object^ __delegateInterfaceArg)
2527  {
2528  return Details::EventSourceAdd(&__targets, __lockArg, reinterpret_cast< ::Platform::Delegate^>(__delegateInterfaceArg));
2529  }
2530 
2531  void Remove(Details::EventLock* __lockArg, ::Windows::Foundation::EventRegistrationToken __tokenArg)
2532  {
2533  Details::EventSourceRemove(&__targets, __lockArg, __tokenArg);
2534  }
2535  private:
2536  // __TInvokeMethod is a functor that performs the appropriate invoke, depending on the
2537  // number of arguments specified.
2538  template <typename __TDelegate, typename __TReturnType, typename __TInvokeMethod>
2539  typename __TReturnType DoInvoke(Details::EventLock* __lockArg, __TInvokeMethod __invokeOneArg)
2540  {
2541  // lock pointer exhange
2542  // targets = _targets
2543  // unlock pointer exhange
2544  // iterate all targets and do invoke
2545 
2546  // The _targetsPointerLock protects the acquisition of an AddRef'd pointer to
2547  // "current list". An Add/Remove operation may occur during the
2548  // firing of events (but occurs on a copy of the list). i.e. both
2549  // DoInvoke/invoke and Add/Remove are readers of the "current list".
2550  // NOTE: EventSource::Invoke(...) must never take the _addRemoveLock.
2551  ::Platform::Object^ __targetsLoc;
2552  // Attaching Array without AddRef'ing
2553  *reinterpret_cast<void**>(&__targetsLoc) = Details::EventSourceGetTargetArray(__targets, __lockArg);
2554 
2555  typename __TReturnType __returnVal = typename __TReturnType();
2556  // The list may not exist if nobody has registered
2557  if (__targetsLoc != nullptr)
2558  {
2559  const unsigned int __size = Details::EventSourceGetTargetArraySize(reinterpret_cast<void*>(__targetsLoc));
2560 
2561  for (unsigned int __index = 0; __index < __size; __index++)
2562  {
2563  ::Windows::Foundation::EventRegistrationToken __token = {};
2564 
2565  try
2566  {
2567  __TDelegate^ __element;
2568  *reinterpret_cast<void**>(&__element) = Details::EventSourceGetTargetArrayEvent(
2569  reinterpret_cast<void*>(__targetsLoc),
2570  __index,
2571  reinterpret_cast<const void*>(&__uuidof(__TDelegate^)),
2572  &__token.Value
2573  );
2574 
2575  __returnVal = (__invokeOneArg)(__element);
2576  }
2577  catch(::Platform::Exception^ e)
2578  {
2579  int __hr = e->HResult;
2580  if (__hr == 0x800706BA /* HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) */
2581  || __hr == 0x80010108 /* RPC_E_DISCONNECTED */
2582  || __hr == 0x89020001 /* JSCRIPT_E_CANTEXECUTE */)
2583  {
2584  Details::EventSourceRemove(&__targets, __lockArg, __token);
2585  }
2586  else
2587  {
2588  throw e;
2589  }
2590  }
2591  }
2592  }
2593  return __returnVal;
2594  }
2595 
2596  // __TInvokeMethod is a functor that performs the appropriate invoke, depending on the
2597  // number of arguments specified.
2598  template <typename __TDelegate, typename __TInvokeMethod>
2599  void DoInvokeVoid(Details::EventLock* __lockArg, __TInvokeMethod __invokeOneArg)
2600  {
2601  // lock pointer exhange
2602  // targets = _targets
2603  // unlock pointer exhange
2604  // iterate all targets and do invoke
2605 
2606  // The _targetsPointerLock protects the acquisition of an AddRef'd pointer to
2607  // "current list". An Add/Remove operation may occur during the
2608  // firing of events (but occurs on a copy of the list). i.e. both
2609  // Invoke/invoke and Add/Remove are readers of the "current list".
2610  // NOTE: EventSource::Invoke(...) must never take the _addRemoveLock.
2611  ::Platform::Object^ __targetsLoc;
2612  // Attaching Array without AddRef'ing
2613  *reinterpret_cast<void**>(&__targetsLoc) = Details::EventSourceGetTargetArray(__targets, __lockArg);
2614 
2615  // The list may not exist if nobody has registered
2616  if (__targetsLoc != nullptr)
2617  {
2618  const unsigned int __size = Details::EventSourceGetTargetArraySize(reinterpret_cast<void*>(__targetsLoc));
2619 
2620  for (unsigned int __index = 0; __index < __size; __index++)
2621  {
2622  ::Windows::Foundation::EventRegistrationToken __token = {};
2623 
2624  try
2625  {
2626  __TDelegate^ __element;
2627  *reinterpret_cast<void**>(&__element) = Details::EventSourceGetTargetArrayEvent(
2628  reinterpret_cast<void*>(__targetsLoc),
2629  __index,
2630  reinterpret_cast<const void*>(&__uuidof(__TDelegate^)),
2631  &__token.Value
2632  );
2633 
2634  (__invokeOneArg)(__element);
2635  }
2636  catch(::Platform::Exception^ e)
2637  {
2638  int __hr = e->HResult;
2639  if (__hr == 0x800706BA /* HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) */
2640  || __hr == 0x80010108 /* RPC_E_DISCONNECTED */
2641  || __hr == 0x89020001 /* JSCRIPT_E_CANTEXECUTE */)
2642  {
2643  Details::EventSourceRemove(&__targets, __lockArg, __token);
2644  }
2645  else
2646  {
2647  throw e;
2648  }
2649  }
2650  }
2651  }
2652  }
2653 
2654  public:
2655  template < typename __TLambda, typename... __TArgs >
2656  void InvokeVoid(Details::EventLock* __lockArg, __TArgs... __args)
2657  {
2658  DoInvokeVoid<__TLambda>(__lockArg, [__args...](__TLambda^ __lambda) -> void { __lambda(__args...); });
2659  }
2660 
2661  template < typename __TLambda, typename __TReturnType, typename... __TArgs >
2662  typename __TReturnType Invoke(Details::EventLock* __lockArg, __TArgs... __args)
2663  {
2664  return DoInvoke<__TLambda, __TReturnType>(__lockArg, [__args...](__TLambda^ __lambda) -> typename __TReturnType { return __lambda(__args...); });
2665  }
2666 
2667  protected:
2668  void* __targets;
2669  };
2670 
2671  class Module
2672  {
2673  public:
2674  typedef void (__stdcall *UnregisterCallback)();
2675  static ::Platform::Object^ __stdcall RegisterFactories(UnregisterCallback callback = nullptr);
2676  static void __stdcall RunServer(const ::default::char16* __serverName = nullptr);
2677  static ::Platform::Details::IActivationFactory^ __stdcall GetActivationFactory(::Platform::String^);
2678  static bool __stdcall CanUnloadNow();
2679  static void __stdcall FlushFactoryCache();
2680  };
2681 
2682  inline ::default::int32 Exception::HResult::get()
2683  {
2684  return __hresult;
2685  }
2686 
2688  {
2689  private:
2690  mutable __abi_IUnknown* __weakPtr;
2691 
2693  {
2694  if (__weakPtr != nullptr)
2695  {
2696  __weakPtr->__abi_AddRef();
2697  }
2698  }
2699 
2701  {
2702  __abi_IUnknown* __tmp = __weakPtr;
2703  if (__tmp != nullptr)
2704  {
2705  __weakPtr = nullptr;
2706  __tmp->__abi_Release();
2707  }
2708  }
2709  public:
2710  struct BoolStruct
2711  {
2712  int Member;
2713  };
2714 
2715  typedef int BoolStruct::* BoolType;
2716 
2717  WeakReference() throw() : __weakPtr(nullptr)
2718  {
2719  }
2720 
2721  WeakReference(decltype(__nullptr)) throw() : __weakPtr(nullptr)
2722  {
2723  }
2724 
2725  WeakReference(const WeakReference& __otherArg) throw() : __weakPtr(__otherArg.__weakPtr)
2726  {
2727  InternalAddRef();
2728  }
2729 
2730  WeakReference(WeakReference&& __otherArg) throw() : __weakPtr(__otherArg.__weakPtr)
2731  {
2732  __otherArg.__weakPtr = nullptr;
2733  }
2734 
2735  explicit WeakReference(const volatile ::Platform::Object^ const __otherArg) : __weakPtr(nullptr)
2736  {
2737  __weakPtr = Details::GetWeakReference(__otherArg);
2738  }
2739 
2740  ~WeakReference() throw()
2741  {
2742  InternalRelease();
2743  }
2744 
2745  WeakReference& operator=(decltype(__nullptr)) throw()
2746  {
2747  InternalRelease();
2748  return *this;
2749  }
2750 
2751  WeakReference& operator=(const WeakReference& __otherArg) throw()
2752  {
2753  if (&__otherArg != this)
2754  {
2755  InternalRelease();
2756  __weakPtr = __otherArg.__weakPtr;
2757  InternalAddRef();
2758  }
2759  return *this;
2760  }
2761 
2762  WeakReference& operator=(WeakReference&& __otherArg) throw()
2763  {
2764  InternalRelease();
2765  __weakPtr = __otherArg.__weakPtr;
2766  __otherArg.__weakPtr = nullptr;
2767  return *this;
2768  }
2769 
2770  WeakReference& operator=(const volatile ::Platform::Object^ const __otherArg)
2771  {
2772  __abi_IUnknown* __weakPtrLoc = Details::GetWeakReference(__otherArg);
2773  InternalRelease();
2774  __weakPtr = __weakPtrLoc;
2775  return *this;
2776  }
2777 
2778  template<typename __TArg>
2779  __declspec(no_refcount)
2780  __TArg^ Resolve() const
2781  {
2782  return reinterpret_cast<__TArg^>(Details::ResolveWeakReference(__uuidof(__TArg^), &__weakPtr));
2783  }
2784 
2785  operator BoolType() const throw()
2786  {
2787  return __weakPtr != nullptr ? &BoolStruct::Member : nullptr;
2788  }
2789 
2790  friend bool operator==(const WeakReference&, const WeakReference&) throw();
2791  friend bool operator==(const WeakReference&, decltype(__nullptr)) throw();
2792  friend bool operator==(decltype(__nullptr), const WeakReference&) throw();
2793  friend bool operator!=(const WeakReference&, const WeakReference&) throw();
2794  friend bool operator!=(const WeakReference&, decltype(__nullptr)) throw();
2795  friend bool operator!=(decltype(__nullptr), const WeakReference&) throw();
2796  friend bool operator<(const WeakReference&, const WeakReference&) throw();
2797  };
2798 
2799  inline bool operator==(const WeakReference& __aArg, const WeakReference& __bArg) throw()
2800  {
2801  return __aArg.__weakPtr == __bArg.__weakPtr;
2802  }
2803 
2804  inline bool operator==(const WeakReference& __aArg, decltype(__nullptr)) throw()
2805  {
2806  return __aArg.__weakPtr == nullptr;
2807  }
2808 
2809  inline bool operator==(decltype(__nullptr), const WeakReference& __bArg) throw()
2810  {
2811  return __bArg.__weakPtr == nullptr;
2812  }
2813 
2814  inline bool operator!=(const WeakReference& __aArg, const WeakReference& __bArg) throw()
2815  {
2816  return __aArg.__weakPtr != __bArg.__weakPtr;
2817  }
2818 
2819  inline bool operator!=(const WeakReference& __aArg, decltype(__nullptr)) throw()
2820  {
2821  return __aArg.__weakPtr != nullptr;
2822  }
2823 
2824  inline bool operator!=(decltype(__nullptr), const WeakReference& __bArg) throw()
2825  {
2826  return __bArg.__weakPtr != nullptr;
2827  }
2828 
2829  inline bool operator<(const WeakReference& __aArg, const WeakReference& __bArg) throw()
2830  {
2831  return __aArg.__weakPtr < __bArg.__weakPtr;
2832  }
2833 } // namespace Platform
2834 
2835 namespace Windows { namespace Foundation
2836 {
2837  inline Point::Point(float __xArg, float __yArg) : X(__xArg), Y(__yArg)
2838  {
2839  }
2840 
2841  inline bool Point::operator ==(Point __point1Arg, Point __point2Arg)
2842  {
2843  return __point1Arg.X == __point2Arg.X && __point1Arg.Y == __point2Arg.Y;
2844  }
2845 
2846  inline bool Point::operator !=(Point __point1Arg, Point __point2Arg)
2847  {
2848  return !(__point1Arg == __point2Arg);
2849  }
2850 
2851  // Size
2852  inline Size::Size(float __widthArg, float __heightArg)
2853  {
2854  if (__widthArg < 0 || __heightArg < 0)
2855  {
2856  __abi_WinRTraiseInvalidArgumentException();
2857  }
2858 
2859  Width = __widthArg;
2860  Height = __heightArg;
2861  }
2862 
2863  inline bool Size::IsEmpty::get()
2864  {
2865  return Width < 0;
2866  }
2867 
2868  inline bool Size::operator ==(Size __size1Arg, Size __size2Arg)
2869  {
2870  return __size1Arg.Height == __size2Arg.Height && __size1Arg.Width == __size2Arg.Width;
2871  }
2872 
2873  inline bool Size::operator !=(Size __size1Arg, Size __size2Arg)
2874  {
2875  return !(__size1Arg == __size2Arg);
2876  }
2877 
2878  inline Rect::Rect(float __xArg, float __yArg, float __widthArg, float __heightArg)
2879  {
2880  if (__widthArg < 0 || __heightArg < 0)
2881  {
2882  __abi_WinRTraiseInvalidArgumentException();
2883  }
2884 
2885  X = __xArg;
2886  Y = __yArg;
2887  Width = __widthArg;
2888  Height = __heightArg;
2889  }
2890 
2891  inline bool Rect::IsEmpty::get()
2892  {
2893  return Width < 0;
2894  }
2895 
2896  inline float Rect::Left::get()
2897  {
2898  return X;
2899  }
2900 
2901  inline float Rect::Top::get()
2902  {
2903  return Y;
2904  }
2905 
2906  inline bool Rect::operator ==(Rect __rect1Arg, Rect __rect2Arg)
2907  {
2908  return __rect1Arg.X == __rect2Arg.X
2909  && __rect1Arg.Y == __rect2Arg.Y
2910  && __rect1Arg.Width == __rect2Arg.Width
2911  && __rect1Arg.Height == __rect2Arg.Height;
2912  }
2913 
2914  inline bool Rect::operator !=(Rect __rect1Arg, Rect __rect2Arg)
2915  {
2916  return !(__rect1Arg == __rect2Arg);
2917  }
2918 } } // namespace Windows::Foundation
2919 
2920 namespace Windows { namespace UI { namespace Xaml
2921 {
2922  inline Thickness::Thickness(double __uniformLengthArg)
2923  {
2924  Left = Top = Right = Bottom = __uniformLengthArg;
2925  }
2926 
2927  inline Thickness::Thickness(double __leftArg, double __topArg, double __rightArg, double __bottomArg)
2928  {
2929  Left = __leftArg;
2930  Top = __topArg;
2931  Right = __rightArg;
2932  Bottom = __bottomArg;
2933  }
2934 
2935  inline bool Thickness::operator==(Thickness __thickness1Arg, Thickness __thickness2Arg)
2936  {
2937  return __thickness1Arg.Left == __thickness2Arg.Left &&
2938  __thickness1Arg.Top == __thickness2Arg.Top &&
2939  __thickness1Arg.Right == __thickness2Arg.Right &&
2940  __thickness1Arg.Bottom == __thickness2Arg.Bottom;
2941  }
2942 
2943  inline bool Thickness::operator!=(Thickness __thickness1Arg, Thickness __thickness2Arg)
2944  {
2945  return !(__thickness1Arg == __thickness2Arg);
2946  }
2947 
2948  inline CornerRadius::CornerRadius(double __uniformRadiusArg)
2949  {
2950  TopLeft = TopRight = BottomRight = BottomLeft = __uniformRadiusArg;
2951  }
2952 
2953  inline CornerRadius::CornerRadius(double __topLeftArg, double __topRightArg, double __bottomRightArg, double __bottomLeftArg)
2954  {
2955  TopLeft = __topLeftArg;
2956  TopRight = __topRightArg;
2957  BottomRight = __bottomRightArg;
2958  BottomLeft = __bottomLeftArg;
2959  }
2960 
2961  inline bool CornerRadius::operator==(CornerRadius __cornerRadius1Arg, CornerRadius __cornerRadius2Arg)
2962  {
2963  return __cornerRadius1Arg.TopLeft == __cornerRadius2Arg.TopLeft &&
2964  __cornerRadius1Arg.TopRight == __cornerRadius2Arg.TopRight &&
2965  __cornerRadius1Arg.BottomRight == __cornerRadius2Arg.BottomRight &&
2966  __cornerRadius1Arg.BottomLeft == __cornerRadius2Arg.BottomLeft;
2967  }
2968 
2969  inline bool CornerRadius::operator!=(CornerRadius __cornerRadius1Arg, CornerRadius __cornerRadius2Arg)
2970  {
2971  return !(__cornerRadius1Arg == __cornerRadius2Arg);
2972  }
2973 
2974  namespace Media
2975  {
2976  inline Matrix Matrix::Identity::get()
2977  {
2978  return Matrix(1, 0, 0, 1, 0, 0);
2979  }
2980 
2981  inline bool Matrix::IsIdentity::get()
2982  {
2983  return M11 == 1 &&
2984  M12 == 0 &&
2985  M21 == 0 &&
2986  M22 == 1 &&
2987  OffsetX == 0 &&
2988  OffsetY == 0;
2989  }
2990 
2991  inline Windows::Foundation::Point Matrix::Transform(Windows::Foundation::Point __pointArg)
2992  {
2993  float x = __pointArg.X;
2994  float y = __pointArg.Y;
2995  double num = (y * M21) + OffsetX;
2996  double num2 = (x * M12) + OffsetY;
2997  x *= (float)M11;
2998  x += (float)num;
2999  y *= (float)M22;
3000  y += (float)num2;
3001  return Windows::Foundation::Point(x, y);
3002  }
3003 
3004  inline Matrix::Matrix(double __m11Arg, double __m12Arg, double __m21Arg, double __m22Arg, double __offsetXArg, double __offsetYArg)
3005  {
3006  M11 = __m11Arg;
3007  M12 = __m12Arg;
3008  M21 = __m21Arg;
3009  M22 = __m22Arg;
3010  OffsetX = __offsetXArg;
3011  OffsetY = __offsetYArg;
3012  }
3013 
3014  inline bool Matrix::operator==(Matrix __matrix1Arg, Matrix __matrix2Arg)
3015  {
3016  return
3017  __matrix1Arg.M11 == __matrix2Arg.M11 &&
3018  __matrix1Arg.M12 == __matrix2Arg.M12 &&
3019  __matrix1Arg.M21 == __matrix2Arg.M21 &&
3020  __matrix1Arg.M22 == __matrix2Arg.M22 &&
3021  __matrix1Arg.OffsetX == __matrix2Arg.OffsetX &&
3022  __matrix1Arg.OffsetY == __matrix2Arg.OffsetY;
3023  }
3024 
3025  inline bool Matrix::operator!=(Matrix __matrix1Arg, Matrix __matrix2Arg)
3026  {
3027  return !(__matrix1Arg == __matrix2Arg);
3028  }
3029 
3030  namespace Media3D
3031  {
3032  inline Matrix3D Matrix3D::Identity::get()
3033  {
3034  return Matrix3D(1, 0, 0, 0,
3035  0, 1, 0, 0,
3036  0, 0, 1, 0,
3037  0, 0, 0, 1);
3038  }
3039 
3040  inline bool Matrix3D::IsIdentity::get()
3041  {
3042  return M11 == 1 && M12 == 0 && M13 == 0 && M14 == 0 &&
3043  M21 == 0 && M22 == 1 && M23 == 0 && M24 == 0 &&
3044  M31 == 0 && M32 == 0 && M33 == 1 && M34 == 0 &&
3045  OffsetX == 0 && OffsetY == 0 && OffsetZ == 0 && M44 == 1;
3046  }
3047 
3048  inline Matrix3D::Matrix3D(double __m11Arg, double __m12Arg, double __m13Arg, double __m14Arg,
3049  double __m21Arg, double __m22Arg, double __m23Arg, double __m24Arg,
3050  double __m31Arg, double __m32Arg, double __m33Arg, double __m34Arg,
3051  double __offsetXArg, double __offsetYArg, double __offsetZArg, double __m44Arg)
3052  {
3053  M11 = __m11Arg;
3054  M12 = __m12Arg;
3055  M13 = __m13Arg;
3056  M14 = __m14Arg;
3057  M21 = __m21Arg;
3058  M22 = __m22Arg;
3059  M23 = __m23Arg;
3060  M24 = __m24Arg;
3061  M31 = __m31Arg;
3062  M32 = __m32Arg;
3063  M33 = __m33Arg;
3064  M34 = __m34Arg;
3065  OffsetX = __offsetXArg;
3066  OffsetY = __offsetYArg;
3067  OffsetZ = __offsetZArg;
3068  M44 = __m44Arg;
3069  }
3070 
3071  inline bool Matrix3D::operator==(Matrix3D __matrix1Arg, Matrix3D __matrix2Arg)
3072  {
3073  return
3074  __matrix1Arg.M11 == __matrix2Arg.M11 &&
3075  __matrix1Arg.M12 == __matrix2Arg.M12 &&
3076  __matrix1Arg.M13 == __matrix2Arg.M13 &&
3077  __matrix1Arg.M14 == __matrix2Arg.M14 &&
3078  __matrix1Arg.M21 == __matrix2Arg.M21 &&
3079  __matrix1Arg.M22 == __matrix2Arg.M22 &&
3080  __matrix1Arg.M23 == __matrix2Arg.M23 &&
3081  __matrix1Arg.M24 == __matrix2Arg.M24 &&
3082  __matrix1Arg.M31 == __matrix2Arg.M31 &&
3083  __matrix1Arg.M32 == __matrix2Arg.M32 &&
3084  __matrix1Arg.M33 == __matrix2Arg.M33 &&
3085  __matrix1Arg.M34 == __matrix2Arg.M34 &&
3086  __matrix1Arg.OffsetX == __matrix2Arg.OffsetX &&
3087  __matrix1Arg.OffsetY == __matrix2Arg.OffsetY &&
3088  __matrix1Arg.OffsetZ == __matrix2Arg.OffsetZ &&
3089  __matrix1Arg.M44 == __matrix2Arg.M44;
3090  }
3091 
3092  inline bool Matrix3D::operator!=(Matrix3D __matrix1Arg, Matrix3D __matrix2Arg)
3093  {
3094  return !(__matrix1Arg == __matrix2Arg);
3095  }
3096  } // Media3D
3097 
3098  namespace Animation
3099  {
3100  inline KeyTime::KeyTime(Windows::Foundation::TimeSpan __timeSpanArg)
3101  {
3102  if (__timeSpanArg.Duration < 0 )
3103  {
3104  __abi_WinRTraiseInvalidArgumentException();
3105  }
3106  TimeSpan = __timeSpanArg;
3107  }
3108 
3109  inline bool KeyTime::operator==(KeyTime __keyTime1Arg, KeyTime __keyTime2Arg)
3110  {
3111  return __keyTime1Arg.TimeSpan.Duration == __keyTime2Arg.TimeSpan.Duration;
3112  }
3113 
3114  inline bool KeyTime::operator!=(KeyTime __keyTime1Arg, KeyTime __keyTime2Arg)
3115  {
3116  return !(__keyTime1Arg == __keyTime2Arg);
3117  }
3118 
3119  inline RepeatBehavior::RepeatBehavior(Windows::Foundation::TimeSpan __durationArg)
3120  {
3121  if (__durationArg.Duration < 0 )
3122  {
3123  __abi_WinRTraiseInvalidArgumentException();
3124  }
3125 
3126  __duration = __durationArg;
3127  __count = 0.0;
3128  __type = RepeatBehaviorType::Duration;
3129  }
3130 
3131  inline double RepeatBehavior::Count::get()
3132  {
3133  return __count;
3134  }
3135 
3136  inline Windows::Foundation::TimeSpan RepeatBehavior::Duration::get()
3137  {
3138  return __duration;
3139  }
3140 
3141  inline RepeatBehaviorType RepeatBehavior::Type::get()
3142  {
3143  return __type;
3144  }
3145 
3146  inline RepeatBehavior RepeatBehavior::Forever::get()
3147  {
3148  RepeatBehavior forever;
3149  Windows::Foundation::TimeSpan ts = {0};
3150  forever.__duration = ts;
3151  forever.__count = 0.0;
3152  forever.__type = RepeatBehaviorType::Forever;
3153 
3154  return forever;
3155  }
3156 
3157  inline bool RepeatBehavior::HasCount::get()
3158  {
3159  return __type == RepeatBehaviorType::Count;
3160  }
3161 
3162  inline bool RepeatBehavior::HasDuration::get()
3163  {
3164  return __type == RepeatBehaviorType::Duration;
3165  }
3166 
3167 
3168  inline bool RepeatBehavior::operator ==(RepeatBehavior __repeatBehavior1Arg, RepeatBehavior __repeatBehavior2Arg)
3169  {
3170  if (__repeatBehavior1Arg.__type == __repeatBehavior2Arg.__type)
3171  {
3172  switch (__repeatBehavior1Arg.__type)
3173  {
3174  case RepeatBehaviorType::Forever:
3175  return true;
3176 
3177  case RepeatBehaviorType::Count:
3178  return __repeatBehavior1Arg.__count == __repeatBehavior2Arg.__count;
3179 
3180  case RepeatBehaviorType::Duration:
3181 
3182  return __repeatBehavior1Arg.__duration.Duration == __repeatBehavior2Arg.__duration.Duration;
3183 
3184  default:
3185  return false;
3186  }
3187  }
3188  else
3189  {
3190  return false;
3191  }
3192  }
3193 
3194  inline bool RepeatBehavior::operator !=(RepeatBehavior __repeatBehavior1Arg, RepeatBehavior __repeatBehavior2Arg)
3195  {
3196  return !(__repeatBehavior1Arg == __repeatBehavior2Arg);
3197  }
3198 
3199  } // Animation
3200  } // Media
3201 
3202  inline Duration::Duration(Windows::Foundation::TimeSpan __timeSpanArg)
3203  {
3204  __durationType = DurationType::TimeSpan;
3205  __timeSpan = __timeSpanArg;
3206  }
3207 
3208  inline bool Duration::operator ==(Duration __t1Arg, Duration __t2Arg)
3209  {
3210  if (__t1Arg.HasTimeSpan)
3211  {
3212  if (__t2Arg.HasTimeSpan)
3213  {
3214  return __t1Arg.__timeSpan.Duration == __t2Arg.__timeSpan.Duration;
3215  }
3216  else
3217  {
3218  return false;
3219  }
3220  }
3221  else
3222  {
3223  return __t1Arg.__durationType == __t2Arg.__durationType;
3224  }
3225  }
3226 
3227  inline bool Duration::operator !=(Duration __t1Arg, Duration __t2Arg)
3228  {
3229  return !(__t1Arg == __t2Arg);
3230  }
3231 
3232  inline bool Duration::HasTimeSpan::get()
3233  {
3234  return (__durationType == DurationType::TimeSpan);
3235  }
3236 
3237  inline Duration Duration::Automatic::get()
3238  {
3239  Duration __duration;
3240  __duration.__durationType = DurationType::Automatic;
3241 
3242  return __duration;
3243  }
3244 
3245  inline Duration Duration::Forever::get()
3246  {
3247  Duration __duration;
3248  __duration.__durationType = DurationType::Forever;
3249 
3250  return __duration;
3251  }
3252 
3253  inline Windows::Foundation::TimeSpan Duration::TimeSpan::get()
3254  {
3255  if (HasTimeSpan)
3256  {
3257  return __timeSpan;
3258  }
3259  else
3260  {
3261  Windows::Foundation::TimeSpan __timeSpanLoc;
3262  __timeSpanLoc.Duration = 0;
3263  return __timeSpanLoc;
3264  }
3265  }
3266 
3267  inline GridLength::GridLength(double __pixelsArg)
3268  {
3269  *this = GridLength(__pixelsArg, Windows::UI::Xaml::GridUnitType::Pixel);
3270  }
3271 
3272  inline double GridLength::Value::get()
3273  {
3274  return (__unitType == Windows::UI::Xaml::GridUnitType::Auto ) ? GridLength(1.0, Windows::UI::Xaml::GridUnitType::Auto).__unitValue : __unitValue;
3275  }
3276 
3277  inline Windows::UI::Xaml::GridUnitType GridLength::GridUnitType::get()
3278  {
3279  return (__unitType);
3280  }
3281 
3282  inline bool GridLength::IsAbsolute::get()
3283  {
3284  return (__unitType == Windows::UI::Xaml::GridUnitType::Pixel);
3285  }
3286 
3287  inline bool GridLength::IsAuto::get()
3288  {
3289  return (__unitType == Windows::UI::Xaml::GridUnitType::Auto);
3290  }
3291 
3292  inline bool GridLength::IsStar::get()
3293  {
3294  return (__unitType == Windows::UI::Xaml::GridUnitType::Star) ;
3295  }
3296 
3297  inline GridLength GridLength::Auto::get()
3298  {
3299  return ( GridLength(1.0, Windows::UI::Xaml::GridUnitType::Auto));
3300  }
3301 
3302  inline bool GridLength::operator ==(GridLength __gridLength1Arg, GridLength __gridLength2Arg)
3303  {
3304  if (__gridLength1Arg.GridUnitType == __gridLength2Arg.GridUnitType)
3305  {
3306  if (__gridLength1Arg.IsAuto || __gridLength1Arg.__unitValue == __gridLength2Arg.__unitValue)
3307  {
3308  return true;
3309  }
3310  }
3311  return false;
3312  }
3313 
3314  inline bool GridLength::operator !=(GridLength __gridLength1Arg, GridLength __gridLength2Arg)
3315  {
3316  return !(__gridLength1Arg == __gridLength2Arg);
3317  }
3318 } } } // Windows::UI::Xaml
3319 
3320 // Don't pull in any symbols if it's vccorlib compiled
3321 #if !defined(VCWINRT_DLL)
3322 #ifdef _WINRT_DLL
3323  // DLL
3324  #ifdef _M_IX86
3325  #pragma comment(linker, "/EXPORT:DllGetActivationFactory=_DllGetActivationFactory@8,PRIVATE")
3326  #pragma comment(linker, "/EXPORT:DllCanUnloadNow=_DllCanUnloadNow@0,PRIVATE")
3327  #else
3328  #pragma comment(linker, "/EXPORT:DllGetActivationFactory=DllGetActivationFactory,PRIVATE")
3329  #pragma comment(linker, "/EXPORT:DllCanUnloadNow,PRIVATE")
3330  #endif
3331 #else
3332  #ifdef _M_IX86
3333  #pragma comment(linker, "/INCLUDE:___abi__initialize")
3334  #else
3335  #pragma comment(linker, "/INCLUDE:__abi__initialize")
3336  #endif // _M_IX86
3337 #endif // _WINRT_DLL
3338 
3339 #if defined(_DEBUG)
3340  #pragma comment(lib, "vccorlibd.lib")
3341 #else
3342  #pragma comment(lib, "vccorlib.lib")
3343 #endif // DEBUG
3344 #endif // !defined(VCWINRT_DLL)
3345 
3346 #pragma pack(pop)
3347 
3348 #pragma initialize_winrt_types_done
3349 
3350 // Restore warnings disabled for this file to their original settings
3351 #pragma warning( pop )
3352 
3353 #if defined(__VCCORLIB_H_ENABLE_ALL_WARNINGS)
3354 #pragma warning(pop)
3355 #endif
3356 
3357 #endif // _VCCORLIB_H_
WeakReference & operator=(const WeakReference &__otherArg)
Definition: vccorlib.h:2751
Definition: agile.h:22
long __stdcall Get() volatile
Definition: vccorlib.h:806
inline::Platform::Array< __TArg, 1 > __abi_winrt_CreateArray(unsigned int __sizeArg)
Definition: vccorlib.h:1999
void(__stdcall * UnregisterCallback)()
Definition: vccorlib.h:2674
WeakReference()
Definition: vccorlib.h:2717
virtual unsigned long __stdcall __abi_Release()
Definition: vccorlib.h:636
Definition: vccorlib.h:1225
const ::default::char16 * Data() const
Definition: vccorlib.h:1265
int __stdcall __Platform_WindowsIsStringEmpty(__abi_HSTRING)
virtual property __TBoxValue Value
Definition: vccorlib.h:1591
unsigned int __length
Definition: vccorlib.h:300
int numcalls_AddRef
Definition: vccorlib.h:129
Definition: vccorlib.h:1456
Definition: vccorlib.h:865
_Variant_copymove_layer_ & operator=(_Variant_copymove_layer_ &&_That) _NOEXCEPT_OP((conjunction< is_nothrow_move_constructible< _Types >...
unsigned long Decrement() volatile
Definition: vccorlib.h:249
reference_wrapper< _Ty > ref(_Ty &_Val) _NOEXCEPT
Definition: type_traits:1839
Platform::String ToStringInternal< false >()
Definition: vccorlib.h:1450
~WeakReference()
Definition: vccorlib.h:2740
StringReference()
Definition: vccorlib.h:1232
__TReturnType DoInvoke(Details::EventLock *__lockArg, __TInvokeMethod __invokeOneArg)
Definition: vccorlib.h:2539
void Init()
Definition: vccorlib.h:1293
__interface virtual __declspec(uuid("00000001-0000-0000-C000-000000000046")) __abi_IClassFactory long __stdcall __abi_LockServer(int)=0
::Platform::Array< __HighLevelType, __dimension > __abi_array_attach(void *__src, unsigned int __size, bool __isFastPass, bool __needsInit)
ControlBlock()
Definition: vccorlib.h:682
long __stdcall __Platform_WindowsStringHasEmbeddedNull(__abi_HSTRING, int *)
return * __ppTargetArg
Definition: vccorlib.h:1361
int refcount
Definition: vccorlib.h:136
static void __stdcall FlushFactoryCache()
__declspec(no_refcount) __declspec(no_release_return) operator Array< __TArg >^()
Definition: vccorlib.h:2145
long __stdcall __windowsCreateString(const __wchar_t *, int, __abi_HSTRING *)
__declspec(non_user_code)~__abi_dtor_helper()
Definition: vccorlib.h:441
__abi_IUnknown * __target
Definition: vccorlib.h:622
void __cdecl ReportUnhandledError(::Platform::Exception^)
void __abi_array_copy_to_and_release(::Platform::Array< __HighLevelType, __dimension >^__arr, void **__dest, unsigned int *__size)
Definition: vccorlib.h:2051
::Platform::Object __boxValue
Definition: vccorlib.h:1549
Definition: vccorlib.h:877
const volatile T __objArg
Definition: vccorlib.h:429
virtual __TReturnType __stdcall Invoke(__TArgs...__args)
Definition: vccorlib.h:881
Definition: vccorlib.h:1465
char * smallCapture[__abi_CaptureBase::__smallCaptureSize]
Definition: vccorlib.h:867
virtual unsigned long __stdcall __abi_AddRef()
Definition: vccorlib.h:631
Definition: vccorlib.h:2710
const __wchar_t * __serverName
Definition: vccorlib.h:1073
unsigned long __stdcall IncrementStrongReference()
Definition: vccorlib.h:660
__wchar_t * __stringRef
Definition: vccorlib.h:303
__declspec(no_release_return) __declspec(no_refcount) operator __declspec(no_release_return) __declspec(no_refcount) __abi_HSTRING GetHSTRING() const
Definition: vccorlib.h:1284
static const size_t __smallCaptureSize
Definition: vccorlib.h:833
void __abi_SetInstrumentationData(__abi_WinClassInstrumentation *__callbackArg)
Definition: vccorlib.h:152
Definition: vccorlib.h:350
Definition: vccorlib.h:827
RemoveConst< typename RemoveVolatile< __TArg >::Type >::Type Type
Definition: vccorlib.h:1503
::Windows::Foundation::EventRegistrationToken Add(Details::EventLock *__lockArg,::Platform::Object^__delegateInterfaceArg)
Definition: vccorlib.h:2526
constexpr _Ty & get(array< _Ty, _Size > &_Arr) _NOEXCEPT
Definition: array:487
const ::default::char16 * end(::Platform::String^__strArg)
Definition: vccorlib.h:1984
__interface virtual __declspec(uuid("AF86E2E0-B12D-4c6a-9C5A-D7AA65101E90")) __abi_IInspectable long __stdcall __abi_GetRuntimeClassName(__abi_HSTRING *)=0
__abi_HSTRING __hString
Definition: vccorlib.h:1326
StringReference & operator=(const StringReference &__fstrArg)
Definition: vccorlib.h:1240
__TArg * __data
Definition: vccorlib.h:924
__LowLevelType * __abi_array_to_raw(const ::Platform::Array< __HighLevelType, __dimension >^)
Definition: vccorlib.h:2072
WeakReference(const WeakReference &__otherArg)
Definition: vccorlib.h:2725
__declspec(non_user_code) __declspec(no_refcount) inline void __abi_delete_String(
Definition: vccorlib.h:1367
const volatile::Platform::Object __objArg __abi_IUnknown * __pUnknown
Definition: vccorlib.h:397
int numcalls_QueryInterface
Definition: vccorlib.h:128
__TArg Type
Definition: vccorlib.h:1485
Definition: vccorlib.h:434
Definition: vccorlib.h:2671
long(__stdcall *__factoryCreator)(unsigned int *
__declspec(no_refcount) __TArg^Resolve() const
Definition: vccorlib.h:2779
__abi_IUnknown * __factory
Definition: vccorlib.h:1057
__TArg Type
Definition: vccorlib.h:1491
Definition: vccorlib.h:898
void Free()
Definition: vccorlib.h:1289
Definition: vccorlib.h:1489
::Platform::Details::IActivationFactory __stdcall GetActivationFactory(::Platform::String^)
__abi_FunctorCapture(__TFunctor __functor)
Definition: vccorlib.h:880
long __stdcall __getIids(int, unsigned long *, const __s_GUID *,::Platform::Guid **)
Definition: vccorlib.h:1507
__abi_TrustLevel
Definition: vccorlib.h:194
Definition: vccorlib.h:1055
Definition: vccorlib.h:310
Definition: vccorlib.h:912
__declspec(non_user_code) __abi_MultiThreadedRefCount()
Definition: vccorlib.h:227
long __stdcall __Platform_WindowsConcatString(__abi_HSTRING, __abi_HSTRING, __abi_HSTRING *)
__abi_CaptureBase * ptr
Definition: vccorlib.h:868
Definition: vccorlib.h:196
struct __Platform_Details_HSTRING_HEADER __Platform_Details_HSTRING_HEADER
void *__cdecl __Platform_memset(void *, int, size_t)
__abi_Module * __abi_module
const ::default::char16 * begin(::Platform::String^__strArg)
Definition: vccorlib.h:1979
friend bool operator==(const WeakReference &, const WeakReference &)
Definition: vccorlib.h:2799
CustomEnum Type
Definition: vccorlib.h:1473
friend bool operator<(const WeakReference &, const WeakReference &)
Definition: vccorlib.h:2829
__declspec(non_user_code) __declspec(non_user_code) long __stdcall __Platform_WindowsCreateString(const ::default::char16 *, unsigned int, __abi_HSTRING *)
size_t __cdecl __Platform_wcslen(const ::default::char16 *)
virtual property T Value
Definition: vccorlib.h:1422
unsigned long __stdcall Decrement() volatile
Definition: vccorlib.h:765
long __stdcall GetRefcount()
Definition: vccorlib.h:677
unsigned int
Definition: vccorlib.h:2495
StringReference & operator=(const ::default::char16 *__strArg)
Definition: vccorlib.h:1254
Definition: vccorlib.h:197
long __stdcall __Platform_WindowsCreateStringReference(const ::default::char16 *, unsigned int, __Platform_Details_HSTRING_HEADER *, __abi_HSTRING *)
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
__declspec(selectany)
Definition: vccorlib.h:1711
__abi_CapturePtr()
Definition: vccorlib.h:869
int numcalls_Release
Definition: vccorlib.h:130
~EventSource()
Definition: vccorlib.h:2521
int numcalls_Other
Definition: vccorlib.h:134
static void __stdcall RunServer(const ::default::char16 *__serverName=nullptr)
static void DestructElementsAndFree(__TArg *__srcArg, unsigned int)
Definition: vccorlib.h:2084
void ReleaseControlBlock() volatile
Definition: vccorlib.h:268
WeakReference(WeakReference &&__otherArg)
Definition: vccorlib.h:2730
Definition: vccorlib.h:198
bool __bAlignedAllocation
Definition: vccorlib.h:624
int i[4]
Definition: dvec.h:68
Platform::String ToStringInternal< true >()
Definition: vccorlib.h:1439
void InternalRelease()
Definition: vccorlib.h:2700
CustomValueType Type
Definition: vccorlib.h:1467
ArrayReference(ArrayReference &&__otherArg)
Definition: vccorlib.h:2133
WeakReference & operator=(const volatile::Platform::Object^const __otherArg)
Definition: vccorlib.h:2770
int numcalls_GetRuntimeClassName
Definition: vccorlib.h:132
Definition: vccorlib.h:565
Definition: vccorlib.h:117
WeakReference(decltype(__nullptr))
Definition: vccorlib.h:2721
Definition: vccorlib.h:701
Definition: vccorlib.h:1063
virtual ~Array()
Definition: vccorlib.h:989
__declspec(dllimport) Platform::String __abi_CustomToString(void *)
Definition: vccorlib.h:1390
Definition: vccorlib.h:2687
_CONCRTIMP void __cdecl Free(_Pre_maybenull_ _Post_invalid_ void *_PAllocation)
Releases a block of memory previously allocated by the Alloc method to the Concurrency Runtime Cachin...
unsigned long Increment() volatile
Definition: vccorlib.h:244
inline::Platform::Details::IWeakReference GetWeakReference()
Definition: vccorlib.h:801
StringReference(const ::default::char16 *__strArg, size_t __lenArg)
Definition: vccorlib.h:1260
void __abi_ThrowIfFailed(long __hrArg)
Definition: vccorlib.h:96
void CreateString(const ::default::char16 *__sourceStringArg, __abi_HSTRING *__destArg)
Definition: vccorlib.h:1202
void * __targets
Definition: vccorlib.h:2668
long __stdcall __Platform_CoCreateFreeThreadedMarshaler(::Platform::Object^,::Platform::Object^*)
long __refcount
Definition: vccorlib.h:225
Definition: vccorlib.h:110
__declspec(non_user_code) __abi_FTMWeakRefData(
Definition: vccorlib.h:710
__abi_IUnknown ** __ppTargetUnknown
Definition: vccorlib.h:398
Definition: vccorlib.h:1378
Platform::Box< typename::Platform::Details::RemoveCV< __TArg >::Type > __abi_create_box(__TArg __boxValueArg)
Definition: vccorlib.h:1730
void CreateString(const ::default::char16 *__bufferArg, unsigned int __lengthArg, __abi_HSTRING *__destArg)
Definition: vccorlib.h:1197
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
unsigned int __stdcall __Platform_WindowsGetStringLen(__abi_HSTRING)
void InternalAddRef()
Definition: vccorlib.h:2692
const __wchar_t * __typeName
Definition: vccorlib.h:1380
unsigned long __stdcall Increment() volatile
Definition: vccorlib.h:755
unsigned int __padding
Definition: vccorlib.h:301
__abi___FactoryCache * __factoryCache
Definition: vccorlib.h:1072
bool __bExceptionAllocation
Definition: vccorlib.h:625
__interface __declspec(uuid("00000035-0000-0000-C000-000000000046")) __abi_IActivationFactory
Definition: vccorlib.h:286
const volatile::Platform::String __pSourceArg auto __pRaw
Definition: vccorlib.h:1346
void Init(const StringReference &__fstrArg)
Definition: vccorlib.h:1297
static const bool value
Definition: vccorlib.h:1509
#define false
Definition: stdbool.h:16
void InvokeVoid(Details::EventLock *__lockArg, __TArgs...__args)
Definition: vccorlib.h:2656
static void DestructElementsAndFree(__TArg *__srcArg, unsigned int __countArg)
Definition: vccorlib.h:2093
void * _InterlockedCompareExchangePointer(void *volatile *, void *, void *)
Definition: vccorlib.h:1460
long __stdcall __Platform_WindowsCompareStringOrdinal(__abi_HSTRING, __abi_HSTRING, int *)
void ReleaseControlBlock()
Definition: vccorlib.h:817
unsigned int Length() const
Definition: vccorlib.h:1269
void *__stdcall __Platform_CoTaskMemAlloc(size_t)
virtual long __stdcall __abi_GetTrustLevel(__abi_TrustLevel *)=0
bool operator!=(decltype(__nullptr), const WeakReference &__bArg)
Definition: vccorlib.h:2824
bool operator==(decltype(__nullptr), const WeakReference &__bArg)
Definition: vccorlib.h:2809
void __abi_CopyToAttached()
Definition: vccorlib.h:158
Definition: vccorlib.h:223
bool __fastpassflag
Definition: vccorlib.h:923
volatile long __weakRefCount
Definition: vccorlib.h:620
__abi_WinClassInstrumentation * callback
Definition: vccorlib.h:126
unsigned int __morepadding
Definition: vccorlib.h:302
Definition: vccorlib.h:1519
void Init(const ::default::char16 *__strArg, unsigned __int64 __lenArg)
Definition: vccorlib.h:1303
void * __addRemoveLock
Definition: vccorlib.h:313
__TArg __winrt_Empty_Struct()
Definition: vccorlib.h:1047
StringReference(const StringReference &__fstrArg)
Definition: vccorlib.h:1236
int numcalls_GetTrustLevel
Definition: vccorlib.h:133
int __flags
Definition: vccorlib.h:299
void Init(__TArg *__dataArg, unsigned int __sizeArg, bool __needsInitArg=false)
Definition: vccorlib.h:2109
bool __bSingleAllocation
Definition: vccorlib.h:623
T type
Definition: vccorlib.h:1521
int(__stdcall *__getTrustLevel)()
void * __detach_as_voidptr(void **__ppObjArg)
Definition: vccorlib.h:535
WeakReference & operator=(decltype(__nullptr))
Definition: vccorlib.h:2745
int __typeId
Definition: vccorlib.h:1381
void CreateStringReference(const ::default::char16 *__sourceStringArg, unsigned int __lengthArg, __Platform_Details_HSTRING_HEADER *__hstringHeaderArg, __abi_HSTRING *__stringArg)
Definition: vccorlib.h:1218
void Delete(__abi_CaptureBase *__pThisArg, void *__pSmallCaptureArg)
Definition: vccorlib.h:855
virtual __stdcall ~__abi_CaptureBase()
Definition: vccorlib.h:830
bool operator<(const WeakReference &__aArg, const WeakReference &__bArg)
Definition: vccorlib.h:2829
void DuplicateString(__abi_HSTRING __sourceArg, __abi_HSTRING *__destArg)
Definition: vccorlib.h:1207
long __stdcall __Platform_WindowsDuplicateString(__abi_HSTRING, __abi_HSTRING *)
void * __targetsLock
Definition: vccorlib.h:312
::Platform::Object __stdcall RegisterFactories(UnregisterCallback callback=nullptr)
__TReturnType Invoke(Details::EventLock *__lockArg, __TArgs...__args)
Definition: vccorlib.h:2662
__abi_WinClassInstrumentation()
Definition: vccorlib.h:138
EventLock * GetStaticEventLock()
Definition: vccorlib.h:317
bool operator<=(const unorm &_Lhs, const unorm &_Rhs) __GPU
Definition: amp_short_vectors.h:480
void ArrayReferenceInit()
Definition: vccorlib.h:984
long __cdecl _InterlockedDecrement(long volatile *)
long __stdcall __Platform_WindowsDeleteString(__abi_HSTRING)
Definition: vccorlib.h:568
EventSource()
Definition: vccorlib.h:2516
HSTRING__ * __abi_HSTRING
Definition: vccorlib.h:85
__abi_FTMWeakRefData * GetFreeThreadedMarshaler()
Definition: vccorlib.h:792
ArrayReference & operator=(ArrayReference &&__otherArg)
Definition: vccorlib.h:2139
Definition: vccorlib.h:1501
unsigned long __stdcall DecrementStrongReference()
Definition: vccorlib.h:666
void DoInvokeVoid(Details::EventLock *__lockArg, __TInvokeMethod __invokeOneArg)
Definition: vccorlib.h:2599
T type
Definition: vccorlib.h:1526
__TFunctor functor
Definition: vccorlib.h:879
ref class __declspec(one_phase_constructed) __declspec(layout_as_external) __declspec(no_empty_identity_interface) Box override typedef::Platform::Details::RemoveCV< __TArg >::Type __TBoxValue
Definition: vccorlib.h:1532
__declspec(dllimport) IUnknown *__stdcall GetObjectContext()
ArrayReference(__TArg *__dataArg, unsigned int __sizeArg, bool __needsInitArg=false)
Definition: vccorlib.h:2128
friend bool operator!=(const WeakReference &, const WeakReference &)
Definition: vccorlib.h:2814
Definition: vccorlib.h:1477
__TArg Type
Definition: vccorlib.h:1479
void Init(const ::default::char16 *__strArg, unsigned int __lenArg)
Definition: vccorlib.h:1315
__TArg __abi_unbox(::Platform::Object^__objArg)
Definition: vccorlib.h:1736
const ::default::char16 *__stdcall __Platform_WindowsGetStringRawBuffer(__abi_HSTRING, unsigned int *)
void * __cookie
Definition: vccorlib.h:1058
bool operator>=(const unorm &_Lhs, const unorm &_Rhs) __GPU
Definition: amp_short_vectors.h:470
Definition: vccorlib.h:124
~__abi_CapturePtr()
Definition: vccorlib.h:870
__declspec(non_user_code) void __abi_dtor()
Definition: vccorlib.h:236
__abi___classObjectEntry::Platform::Guid __abi_IUnknown **const __wchar_t *__stdcall * __getRuntimeName()
__TArg * begin(const Array< __TArg, 1 >^__arrArg)
Definition: vccorlib.h:2472
~StringReference()
Definition: vccorlib.h:1228
__Platform_Details_HSTRING_HEADER __header
Definition: vccorlib.h:1325
unsigned long Get() volatile
Definition: vccorlib.h:264
__abi_IUnknown *volatile __pUnkMarshal
Definition: vccorlib.h:707
volatile long __strongRefCount
Definition: vccorlib.h:621
long __cdecl _InterlockedIncrement(long volatile *)
__abi_IUnknown * __pUnknown
Definition: vccorlib.h:436
void Remove(Details::EventLock *__lockArg,::Windows::Foundation::EventRegistrationToken __tokenArg)
Definition: vccorlib.h:2531
WeakReference & operator=(WeakReference &&__otherArg)
Definition: vccorlib.h:2762
int BoolStruct::* BoolType
Definition: vccorlib.h:2715
static bool __stdcall CanUnloadNow()
StringReference(const ::default::char16 *__strArg)
Definition: vccorlib.h:1250
int Member
Definition: vccorlib.h:2712
Definition: vccorlib.h:297
long __stdcall __abi_QueryInterface(::Platform::Guid &__guid, void **__pOut)
Definition: vccorlib.h:1772
CustomBox(T value)
Definition: vccorlib.h:1415
WeakReference(const volatile::Platform::Object^const __otherArg)
Definition: vccorlib.h:2735
unsigned int __size
Definition: vccorlib.h:922
Definition: set:43
Definition: vccorlib.h:2513
long __cdecl _InterlockedCompareExchange(long volatile *, long, long)
#define true
Definition: stdbool.h:17
int destructed
Definition: vccorlib.h:135
long __stdcall __getActivationFactoryByPCWSTR(void *,::Platform::Guid &, void **)
__declspec(non_user_code) void __abi_dtor()
Definition: vccorlib.h:738
bool operator>(const unorm &_Lhs, const unorm &_Rhs) __GPU
Definition: amp_short_vectors.h:450
void * GetVFunction(int __slotArg)
Definition: vccorlib.h:850
void __stdcall __Platform_CoTaskMemFree(void *)
::Platform::Details::ControlBlock * __weakRefSource
Definition: vccorlib.h:706
__TArg * end(const Array< __TArg, 1 >^__arrArg)
Definition: vccorlib.h:2478
__declspec(non_user_code) __abi_dtor_helper(const volatile
Definition: vccorlib.h:438
int numcalls_GetIids
Definition: vccorlib.h:131