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  } // namespace Details
1506 
1507  template<typename __TArg>
1508  ref class
1509  __declspec(one_phase_constructed)
1510  __declspec(layout_as_external)
1511  __declspec(no_empty_identity_interface)
1512  Box abstract :
1513  public ::Platform::IBox<typename ::Platform::Details::RemoveCV<__TArg>::Type>,
1514  public Details::BoxValueType<__is_enum(__TArg)>::Type
1515  {
1516  static_assert(__is_enum(__TArg) || __is_value_class(__TArg) || __is_trivial(__TArg), "__TArg type of Box<__TArg> must be either value type or enum type");
1517 
1518  typedef typename ::Platform::Details::RemoveCV<__TArg>::Type __TBoxValue;
1519  internal:
1520  Box(__TBoxValue __valueArg)
1521  {
1522  static auto __typeCode = ::Platform::Type::GetTypeCode(__TBoxValue::typeid);
1523  ::Platform::Object ^__boxValue = Details::CreateValue(__typeCode, &__valueArg);
1524  if (__boxValue == nullptr)
1525  {
1526  __boxValue = ref new Details::CustomBox<__TBoxValue>(__valueArg);
1527  return reinterpret_cast<Box^>(__boxValue);
1528  }
1529 
1530  return dynamic_cast<Box^>(__boxValue);
1531  }
1532 
1533  operator __TBoxValue()
1534  {
1535  if (this == nullptr)
1536  {
1537  throw ref new ::Platform::NullReferenceException();
1538  }
1539 
1540  return safe_cast< ::Platform::IBox<__TBoxValue>^>(this)->Value;
1541  }
1542 
1543  operator Box<const __TBoxValue>^()
1544  {
1545  return reinterpret_cast<Box<const __TBoxValue>^>(this);
1546  }
1547 
1548  operator Box<volatile __TBoxValue>^()
1549  {
1550  return reinterpret_cast<Box<volatile __TBoxValue>^>(this);
1551  }
1552 
1553  operator Box<const volatile __TBoxValue>^()
1554  {
1555  return reinterpret_cast<Box<const volatile __TBoxValue>^>(this);
1556  }
1557 
1558  static operator Box<__TArg>^( ::Platform::IBox<__TArg>^ __boxValueArg)
1559  {
1560  return reinterpret_cast<Box<__TArg>^>(__boxValueArg);
1561  }
1562 
1563  public:
1564  virtual property __TBoxValue Value
1565  {
1566  __TBoxValue get()
1567  {
1568  if (this == nullptr)
1569  {
1570  throw ref new ::Platform::NullReferenceException();
1571  }
1572 
1573  return safe_cast< ::Platform::IBox<__TBoxValue>^>(this)->Value;
1574  }
1575  }
1576  };
1577 
1579  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)
1580  {
1581  }
1582 
1583  inline Guid::Guid(__rcGUID_t __guid) :
1584  __a(reinterpret_cast<const __s_GUID&>(__guid).Data1),
1585  __b(reinterpret_cast<const __s_GUID&>(__guid).Data2),
1586  __c(reinterpret_cast<const __s_GUID&>(__guid).Data3),
1587  __d(reinterpret_cast<const __s_GUID&>(__guid).Data4[0]),
1588  __e(reinterpret_cast<const __s_GUID&>(__guid).Data4[1]),
1589  __f(reinterpret_cast<const __s_GUID&>(__guid).Data4[2]),
1590  __g(reinterpret_cast<const __s_GUID&>(__guid).Data4[3]),
1591  __h(reinterpret_cast<const __s_GUID&>(__guid).Data4[4]),
1592  __i(reinterpret_cast<const __s_GUID&>(__guid).Data4[5]),
1593  __j(reinterpret_cast<const __s_GUID&>(__guid).Data4[6]),
1594  __k(reinterpret_cast<const __s_GUID&>(__guid).Data4[7])
1595  {
1596  }
1597 
1598  inline Guid::operator ::__rcGUID_t()
1599  {
1600  return reinterpret_cast<__rcGUID_t>(*this);
1601  }
1602 
1603  inline bool ::Platform::Guid::Equals(::Platform::Guid __guidArg)
1604  {
1605  auto __al = reinterpret_cast<const unsigned long*>(this);
1606  auto __bl = reinterpret_cast<const unsigned long*>(&__guidArg);
1607 
1608  return (__al[0] == __bl[0] && __al[1] == __bl[1] && __al[2] == __bl[2] && __al[3] == __bl[3]);
1609  }
1610 
1611  inline bool ::Platform::Guid::Equals(__rcGUID_t __guidArg)
1612  {
1613  auto __al = reinterpret_cast<const unsigned long*>(this);
1614  auto __bl = reinterpret_cast<const unsigned long*>(&__guidArg);
1615 
1616  return (__al[0] == __bl[0] && __al[1] == __bl[1] && __al[2] == __bl[2] && __al[3] == __bl[3]);
1617  }
1618 
1619  inline bool ::Platform::Guid::operator==(::Platform::Guid __aArg, ::Platform::Guid __bArg)
1620  {
1621  auto __al = reinterpret_cast<const unsigned long*>(&__aArg);
1622  auto __bl = reinterpret_cast<const unsigned long*>(&__bArg);
1623 
1624  return (__al[0] == __bl[0] && __al[1] == __bl[1] && __al[2] == __bl[2] && __al[3] == __bl[3]);
1625  }
1626 
1627  inline bool ::Platform::Guid::operator!=(::Platform::Guid __aArg, ::Platform::Guid __bArg)
1628  {
1629  return !(__aArg == __bArg);
1630  }
1631 
1632  inline bool ::Platform::Guid::operator<(::Platform::Guid __aArg, ::Platform::Guid __bArg)
1633  {
1634  auto __al = reinterpret_cast<const unsigned long*>(&__aArg);
1635  auto __bl = reinterpret_cast<const unsigned long*>(&__bArg);
1636 
1637  if (__al[0] != __bl[0])
1638  {
1639  return __al[0] < __bl[0];
1640  }
1641 
1642  if (__al[1] != __bl[1])
1643  {
1644  return __al[1] < __bl[1];
1645  }
1646 
1647  if (__al[2] != __bl[2])
1648  {
1649  return __al[2] < __bl[2];
1650  }
1651 
1652  if (__al[3] != __bl[3])
1653  {
1654  return __al[3] < __bl[3];
1655  }
1656 
1657  return false;
1658  }
1659 
1660  inline Guid::Guid(unsigned int __aArg, unsigned short __bArg, unsigned short __cArg, unsigned __int8 __dArg,
1661  unsigned __int8 __eArg, unsigned __int8 __fArg, unsigned __int8 __gArg, unsigned __int8 __hArg,
1662  unsigned __int8 __iArg, unsigned __int8 __jArg, unsigned __int8 __kArg) :
1663  __a(__aArg), __b(__bArg), __c(__cArg), __d(__dArg), __e(__eArg), __f(__fArg), __g(__gArg), __h(__hArg), __i(__iArg), __j(__jArg), __k(__kArg)
1664  {
1665  }
1666 
1667  inline Guid::Guid(unsigned int __aArg, unsigned short __bArg, unsigned short __cArg, const ::Platform::Array<unsigned __int8>^ __dArg) :
1668  __a(__aArg), __b(__bArg), __c(__cArg)
1669  {
1670  if (__dArg == nullptr || __dArg->Length != 8)
1671  {
1672  __abi_WinRTraiseInvalidArgumentException();
1673  }
1674  __d = __dArg[0];
1675  __e = __dArg[1];
1676  __f = __dArg[2];
1677  __g = __dArg[3];
1678  __h = __dArg[4];
1679  __i = __dArg[5];
1680  __j = __dArg[6];
1681  __k = __dArg[7];
1682  }
1683 
1684  __declspec(selectany) ::Platform::Guid __winrt_GUID_NULL = {0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1685 
1687  inline void* Details::Heap::Allocate(::Platform::SizeT /*__sizeArg*/, void* __pPlacementArg)
1688  {
1689  return __pPlacementArg;
1690  }
1691 
1692  inline void* Details::Heap::Allocate(::Platform::SizeT /*__rcOffset*/, ::Platform::SizeT /*__sizeArg*/, void* __pPlacementArg)
1693  {
1694  return __pPlacementArg;
1695  }
1696 
1697  inline void Details::Heap::PlacementFree(void* /*__pArg*/, void* /*__placementArg*/)
1698  {
1699  }
1700 } // namespace Platform
1701 
1702 template <typename __TArg>
1703 Platform::Box<typename ::Platform::Details::RemoveCV<__TArg>::Type>^ __abi_create_box(__TArg __boxValueArg)
1704 {
1705  return ref new ::Platform::Box<__TArg>(__boxValueArg);
1706 }
1707 
1708 template <typename __TArg>
1709 __TArg __abi_unbox(::Platform::Object^ __objArg)
1710 {
1711  return safe_cast< ::Platform::Box<__TArg>^>(__objArg);
1712 }
1713 
1714 template<typename T>
1715 __declspec(non_user_code)
1716  inline T^ __abi_winrt_cast_from_object_to_delegate(bool __isDynamicCastArg, ::Platform::Object^ __objArg)
1717 {
1718  if (__objArg == nullptr) {
1719  return nullptr;
1720  }
1721 
1722  auto __p(dynamic_cast< ::Platform::Details::CustomBox<T^> ^>(__objArg));
1723  if (__p == nullptr) {
1724  if (__isDynamicCastArg) {
1725  return nullptr;
1726  }
1727 
1728  __abi_WinRTraiseInvalidCastException();
1729  } else {
1730  return __p->Value;
1731  }
1732 }
1733 
1734 template<typename T>
1735 __declspec(non_user_code) __declspec(no_refcount)
1736  inline ::Platform::Object^ __abi_winrt_cast_from_delegate_to_object(bool /*__isDynamicCastArg*/, T^ __objArg)
1737 {
1738  if (__objArg == nullptr) {
1739  return nullptr;
1740  } else {
1741  return ref new ::Platform::Details::CustomBox<T^>(__objArg);
1742  }
1743 }
1744 
1745 inline long __stdcall __abi_FTMWeakRefData::__abi_QueryInterface(::Platform::Guid& __guid, void** __pOut)
1746 {
1747  if (__pUnkMarshal == nullptr || __guid.Equals(__uuidof(__abi_IMarshal)) == false)
1748  {
1749  return 0x80004002;
1750  }
1751  if (__pUnkMarshal == reinterpret_cast<__abi_IUnknown*>(-1))
1752  {
1753  __abi_IUnknown* __pUnkMarshalLocal;
1754 
1755 #if !defined(VCWINRT_DLL)
1756  long __hr = ::__Platform_CoCreateFreeThreadedMarshaler(reinterpret_cast<::Platform::Object^>(__weakRefSource->__target), reinterpret_cast< ::Platform::Object^*>(&__pUnkMarshalLocal));
1757 #else
1758  long __hr = ::CoCreateFreeThreadedMarshaler(reinterpret_cast<IUnknown*>(__weakRefSource->__target), reinterpret_cast<IUnknown**>(&__pUnkMarshalLocal));
1759 #endif
1760  __abi_ThrowIfFailed(__hr);
1761 
1762  if (::_InterlockedCompareExchangePointer(reinterpret_cast<void* volatile*>(&__pUnkMarshal), __pUnkMarshalLocal, reinterpret_cast<void*>(-1)) != reinterpret_cast<void*>(-1))
1763  {
1764  __pUnkMarshalLocal->__abi_Release();
1765  }
1766  }
1767  return __pUnkMarshal->__abi_QueryInterface(__guid, __pOut);
1768 }
1769 
1770 inline long __stdcall ::Platform::Details::ControlBlock::__abi_QueryInterface(::Platform::Guid& __riid, void** __ppvObject)
1771 {
1772  if (__riid.Equals(__uuidof(__abi_IUnknown)) ||
1773  __riid.Equals(__uuidof(__abi_IWeakReference)))
1774  {
1775  __abi_AddRef();
1776  *__ppvObject = this;
1777  return 0;
1778  }
1779  *__ppvObject = nullptr;
1780  return 0x80004002;
1781 }
1782 
1783 #pragma region String
1784 #pragma region String^ API
1785 
1786 namespace Platform
1787 {
1788 #if !defined(_PREFIX_) && !defined(_PREFAST_)
1789 
1790  __declspec(no_refcount)
1791  __declspec(no_release_return)
1792  inline String::String()
1793  {
1794  return nullptr;
1795  }
1796 
1797  __declspec(no_refcount)
1798  inline String::String(__abi_HSTRING __hstrArg)
1799  {
1800  __abi_HSTRING __hstr;
1801  Details::DuplicateString(__hstrArg, &__hstr);
1802  return *reinterpret_cast<String^*>(&__hstr);
1803  }
1804 
1805  __declspec(no_refcount)
1806  inline String::String(const ::default::char16* __strArg)
1807  {
1808  if (__strArg == nullptr)
1809  return nullptr;
1810 
1811  __abi_HSTRING __hstr = nullptr;
1812  ::Platform::Details::CreateString(__strArg, (unsigned int)__Platform_wcslen(__strArg), &__hstr);
1813  return *reinterpret_cast<String^*>(&__hstr);
1814  }
1815 
1816  __declspec(no_refcount)
1817  inline String::String(const ::default::char16* __strArg, unsigned int __lenArg)
1818  {
1819  if ((__strArg == nullptr) || (__lenArg == 0))
1820  return nullptr;
1821 
1822  __abi_HSTRING __hstr = nullptr;
1823  ::Platform::Details::CreateString(__strArg, __lenArg, &__hstr);
1824  return *reinterpret_cast<String^*>(&__hstr);
1825  }
1826 
1827 #endif // !defined(_PREFIX_) && !defined(_PREFAST_)
1828 
1829  inline const ::default::char16* String::Begin()
1830  {
1831  return Data();
1832  }
1833  inline const ::default::char16* String::End()
1834  {
1835  return Data() + Length();
1836  }
1837 
1838  inline Platform::String^ Object::ToString()
1839  {
1840  return ::__abi_details::__abi_ObjectToString(this, true);
1841  }
1842 
1843  inline const ::default::char16 * String::Data()
1844  {
1845  return __Platform_WindowsGetStringRawBuffer(reinterpret_cast<__abi_HSTRING>(this), nullptr);
1846  }
1847 
1848  inline unsigned int String::Length()
1849  {
1850  return __Platform_WindowsGetStringLen(reinterpret_cast<__abi_HSTRING>(this));
1851  }
1852  inline bool String::IsEmpty()
1853  {
1854  return __Platform_WindowsIsStringEmpty(reinterpret_cast<__abi_HSTRING>(this)) ? true : false;
1855  }
1856 
1857  inline bool String::IsFastPass()
1858  {
1859  return false;
1860  }
1861 
1862  inline bool String::Equals(Object^ __strArg)
1863  {
1864  int __result = 0;
1865  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(this), reinterpret_cast<__abi_HSTRING>(((String^)__strArg)), &__result);
1866  return (__result == 0);
1867  }
1868 
1869  inline bool String::Equals(String^ __str1Arg)
1870  {
1871  int __result = 0;
1872  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(this), reinterpret_cast<__abi_HSTRING>(__str1Arg), &__result);
1873  return (__result == 0);
1874  }
1875  inline int String::CompareOrdinal(String^ __str1Arg, String^ __str2Arg)
1876  {
1877  int __result = 0;
1878  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1879  return __result;
1880  }
1881  inline int String::GetHashCode()
1882  {
1883  int __hash = 0;
1884  for (auto i = Begin(); i != End(); ++i)
1885  __hash += *i;
1886  return __hash;
1887  }
1888 
1889  inline bool ::Platform::String::operator==(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1890  {
1891  int __result = 0;
1892  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1893  return (__result == 0);
1894  }
1895 
1896  inline bool ::Platform::String::operator!=(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1897  {
1898  int __result = 0;
1899  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1900  return (__result != 0);
1901  }
1902 
1903  inline bool ::Platform::String::operator<(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1904  {
1905  int __result = 0;
1906  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1907  return (__result < 0);
1908  }
1909 
1910  inline bool ::Platform::String::operator>(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1911  {
1912  int __result = 0;
1913  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1914  return (__result > 0);
1915  }
1916 
1917  inline bool ::Platform::String::operator<=(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1918  {
1919  int __result = 0;
1920  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1921  return (__result <= 0);
1922  }
1923 
1924  inline bool ::Platform::String::operator>=(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1925  {
1926  int __result = 0;
1927  __Platform_WindowsCompareStringOrdinal(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), &__result);
1928  return (__result >= 0);
1929  }
1930 
1931  inline ::Platform::String ^ ::Platform::String::Concat(::Platform::String^ __str1Arg, ::Platform::String^ __str2Arg)
1932  {
1933  String^ __str = nullptr;
1934  __abi_ThrowIfFailed(__Platform_WindowsConcatString(reinterpret_cast<__abi_HSTRING>(__str1Arg), reinterpret_cast<__abi_HSTRING>(__str2Arg), reinterpret_cast<__abi_HSTRING*>(&__str)));
1935  return __str;
1936  }
1937 
1938  inline ::Platform::String ^ ::Platform::String::Concat(::Platform::Object^ __str1Arg, ::Platform::Object^ __str2Arg)
1939  {
1940  String^ __str = nullptr;
1941 #pragma warning (suppress:6011) // False positive because __str?Arg not evaluated
1942  __abi_ThrowIfFailed(__Platform_WindowsConcatString(reinterpret_cast<__abi_HSTRING>(__str1Arg->ToString()), reinterpret_cast<__abi_HSTRING>(__str2Arg->ToString()), reinterpret_cast<__abi_HSTRING*>(&__str)));
1943  return __str;
1944  }
1945 
1946  inline String^ String::ToString()
1947  {
1948  return ref new ::Platform::String(Data());
1949  }
1950 
1951 #pragma region string iterators
1952  inline const ::default::char16 * begin(::Platform::String^ __strArg)
1953  {
1954  return __strArg->Begin();
1955  }
1956 
1957  inline const ::default::char16 * end(::Platform::String^ __strArg)
1958  {
1959  return __strArg->End();
1960  }
1961 #pragma endregion
1962 } // namespace Platform
1963 #pragma endregion
1964 
1965 __declspec(non_user_code)
1966  inline ::Platform::String^ __abi_winrt_CreateSystemStringFromLiteral(const ::default::char16* __strArg)
1967 {
1968  return ref new ::Platform::String(__strArg);
1969 }
1970 
1971 template<typename __TArg>
1972 inline ::Platform::Array<__TArg, 1>^ __abi_winrt_CreateArray(unsigned int __sizeArg)
1973 {
1974  return ref new ::Platform::Array<__TArg, 1>(__sizeArg);
1975 }
1976 
1977 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)
1978 {
1979  __abi_HSTRING __hstr;
1980  ::Platform::Details::CreateStringReference(__strArg, __lenArg, __psheaderArg, &__hstr);
1981  return *reinterpret_cast< ::Platform::String^*>(&__hstr);
1982 }
1983 
1984 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)
1985 {
1986  return __abi_winrt_CreateFastPassSystemStringFromLiteral(reinterpret_cast<const ::default::char16*>(__strArg), __lenArg, __psheaderArg);
1987 }
1988 
1989 #pragma endregion
1990 
1991 #pragma region Array
1992 
1993 namespace Platform
1994 {
1995  namespace Details
1996  {
1997  // Attach to the external buffer
1998  template <typename __HighLevelType, unsigned int __dimension>
1999  __declspec(no_refcount) ::Platform::Array<__HighLevelType, __dimension>^ __abi_array_attach(void* __srcArg, unsigned int __elementcountArg, bool __isFastPassArg, bool __needsInitArg)
2000  {
2001  if (static_cast<unsigned int>(-1) / sizeof(__HighLevelType) < __elementcountArg)
2002  {
2003  __abi_WinRTraiseInvalidArgumentException();
2004  }
2005  auto __arr = ref new ::Platform::Array<__HighLevelType, __dimension>(nullptr, 0);
2006 
2007  if (__needsInitArg)
2008  {
2009  __Platform_memset(__srcArg, 0, sizeof(__HighLevelType) * __elementcountArg);
2010  }
2011  if (!__isFastPassArg)
2012  {
2013  __arr->Attach(reinterpret_cast<__HighLevelType*>(__srcArg), __elementcountArg);
2014  }
2015  else
2016  {
2017  __arr->AttachFastPass(reinterpret_cast<__HighLevelType*>(__srcArg), __elementcountArg);
2018  }
2019 
2020  return __arr;
2021  }
2022 
2023  template <typename __HighLevelType, unsigned int __dimension>
2024  void __abi_array_copy_to_and_release(::Platform::Array<__HighLevelType, __dimension>^ __arrArg, void** __destArg, unsigned int* __sizeArg)
2025  {
2026  if (__arrArg == nullptr)
2027  {
2028  *__destArg = nullptr;
2029  *__sizeArg = 0;
2030  return;
2031  }
2032 
2033  __HighLevelType **__destHigh = reinterpret_cast<__HighLevelType **>(__destArg);
2034  __arrArg->CopyToOrDetach(__destHigh, __sizeArg);
2035 
2036  // __arrArg is a local variable declared in a wrapper marked with no_refcount
2037  // This function is called from that function, have to release the Array^
2038  reinterpret_cast<__abi_IUnknown*>(static_cast< ::Platform::Object^>(__arrArg))->__abi_Release();
2039  // The caller will not use __arrArg after this function returns
2040  }
2041 
2042  // Convert ::Platform::Array to raw buffer
2043  // It is called when we are converting in Array from high level to low level
2044  template <typename __LowLevelType, typename __HighLevelType, unsigned int __dimension>
2045  __LowLevelType* __abi_array_to_raw(const ::Platform::Array<__HighLevelType, __dimension>^ __arrArg)
2046  {
2047  if (__arrArg == nullptr)
2048  {
2049  return nullptr;
2050  }
2051  return reinterpret_cast<__LowLevelType*>(__arrArg->Data);
2052  }
2053 
2054  template <typename __TArg>
2055  struct array_helper<__TArg, true>
2056  {
2057  static void DestructElementsAndFree(__TArg* __srcArg, unsigned int)
2058  {
2059  __Platform_CoTaskMemFree(__srcArg);
2060  }
2061  };
2062 
2063  template <typename __TArg>
2064  struct array_helper<__TArg, false>
2065  {
2066  static void DestructElementsAndFree(__TArg* __srcArg, unsigned int __countArg)
2067  {
2068  typedef __TArg typeT;
2069  for (unsigned int __i = 0; __i < __countArg; __i++)
2070  {
2071  (&__srcArg[__i])->~typeT();
2072  }
2073  __Platform_CoTaskMemFree(__srcArg);
2074  }
2075  };
2076  } // namespace Details
2077 
2078  template <typename __TArg>
2079  class ArrayReference<__TArg, 1>
2080  {
2081  default::uint8 __data[sizeof(Array<__TArg>)];
2082  void Init(__TArg* __dataArg, unsigned int __sizeArg, bool __needsInitArg = false)
2083  {
2084  __Platform_memset(__data, 0, sizeof(Array<__TArg>));
2085  ArrayReference* __pThis = this;
2086  Array<__TArg>^* __pArrayThis = reinterpret_cast<Array<__TArg>^*>(&__pThis);
2087  (*__pArrayThis)->ArrayReferenceInit();
2088 
2089  if (__needsInitArg)
2090  {
2091  if (static_cast<unsigned int>(-1) / sizeof(__TArg) < __sizeArg)
2092  {
2093  __abi_WinRTraiseInvalidArgumentException();
2094  }
2095  __Platform_memset(__dataArg, 0, sizeof(__TArg) * __sizeArg);
2096  }
2097 
2098  (*__pArrayThis)->AttachFastPass(__dataArg, __sizeArg);
2099  }
2100  public:
2101  ArrayReference(__TArg* __dataArg, unsigned int __sizeArg, bool __needsInitArg = false)
2102  {
2103  Init(__dataArg, __sizeArg, __needsInitArg);
2104  }
2105 
2107  {
2108  Array<__TArg>^* __pOther = reinterpret_cast<Array<__TArg>^*>(&__otherArg);
2109  Init((*__pOther)->__data, (*__pOther)->__size);
2110  }
2111 
2113  {
2114  Array<__TArg>^* __pOther = reinterpret_cast<Array<__TArg>^*>(&__otherArg);
2115  Init((*pOther)->__data, (*pOther)->__size);
2116  }
2117 
2118  __declspec(no_refcount) __declspec(no_release_return)
2119  operator Array<__TArg>^()
2120  {
2121  ArrayReference* __pThis = this;
2122  Array<__TArg>^* __pArrayThis = reinterpret_cast<Array<__TArg>^*>(&__pThis);
2123 
2124  return *__pArrayThis;
2125  }
2126  private:
2128  ArrayReference& operator=(const ArrayReference&);
2129  };
2130 
2131 #pragma region ::Platform::WriteOnlyArray
2132  template <typename __TArg>
2133  inline WriteOnlyArray<__TArg, 1>::WriteOnlyArray() : __size(0), __fastpassflag(false), __data(nullptr)
2134  {
2135  }
2136 
2137  template <typename __TArg>
2138  inline WriteOnlyArray<__TArg, 1>::WriteOnlyArray(unsigned int __sizeArg) : __size(0), __fastpassflag(false), __data(nullptr)
2139  {
2140  if (__sizeArg == 0)
2141  {
2142  return;
2143  }
2144  __data = AllocateAndZeroInitialize(__sizeArg);
2145  __size = __sizeArg;
2146  }
2147 
2148  template <typename __TArg>
2149  inline WriteOnlyArray<__TArg, 1>::WriteOnlyArray(__TArg* __dataArg, unsigned int __sizeArg) : __size(0), __fastpassflag(false), __data(nullptr)
2150  {
2151  if (__sizeArg == 0)
2152  {
2153  return;
2154  }
2155  __data = AllocateAndCopyElements(__dataArg, __sizeArg);
2156  __size = __sizeArg;
2157  }
2158 
2159  template <typename __TArg>
2161  {
2162  if ((__fastpassflag == false) && (__data != nullptr))
2163  {
2165  }
2166  Clear();
2167  }
2168 
2169  template <typename __TArg>
2170  inline __TArg& WriteOnlyArray<__TArg, 1>::set(unsigned int __positionArg, __TArg __valueArg)
2171  {
2172  if (__data == nullptr)
2173  {
2174  __abi_WinRTraiseNullReferenceException();
2175  }
2176 
2177  if (__positionArg >= 0 && __positionArg < __size)
2178  {
2179  __data[__positionArg] = __valueArg;
2180  return __data[__positionArg];
2181  }
2182 
2183  __abi_WinRTraiseOutOfBoundsException();
2184  }
2185 
2186  template <typename __TArg>
2187  inline __TArg& WriteOnlyArray<__TArg, 1>::get(unsigned int __positionArg) const
2188  {
2189  if (__data == nullptr)
2190  {
2191  __abi_WinRTraiseNullReferenceException();
2192  }
2193 
2194  if (__positionArg >= 0 && __positionArg < __size)
2195  {
2196  return __data[__positionArg];
2197  }
2198 
2199  __abi_WinRTraiseOutOfBoundsException();
2200  }
2201 
2202 #if defined(_PREFIX_) || defined(_PREFAST_)
2203  template <typename __TArg>
2204  inline __TArg& WriteOnlyArray<__TArg, 1>::operator [](unsigned int __positionArg) const
2205  {
2206  if (__data == nullptr)
2207  {
2208  __abi_WinRTraiseNullReferenceException();
2209  }
2210 
2211  if (__positionArg >= 0 && __positionArg < __size)
2212  {
2213  return __data[__positionArg];
2214  }
2215 
2216  __abi_WinRTraiseOutOfBoundsException();
2217  }
2218 #endif // #if defined(_PREFIX_) || defined(_PREFAST_)
2219 
2220  template <typename __TArg>
2221  inline __TArg* WriteOnlyArray<__TArg, 1>::begin() const
2222  {
2223  if (__data == nullptr)
2224  {
2225  return nullptr;
2226  }
2227 
2228  return &(__data[0]);
2229  }
2230 
2231  template <typename __TArg>
2232  inline __TArg* WriteOnlyArray<__TArg, 1>::end() const
2233  {
2234  if (__data == nullptr)
2235  {
2236  return nullptr;
2237  }
2238 
2239  return &(__data[__size]);
2240  }
2241 
2242  template <typename __TArg>
2243  inline unsigned int WriteOnlyArray<__TArg, 1>::Length::get() const
2244  {
2245  return __size;
2246  }
2247 
2248  template <typename __TArg>
2249  inline __TArg* WriteOnlyArray<__TArg, 1>::Data::get() const
2250  {
2251  return this->begin();
2252  }
2253 
2254  template <typename __TArg>
2255  inline bool WriteOnlyArray<__TArg, 1>::FastPass::get() const
2256  {
2257  return __fastpassflag;
2258  }
2259 
2260  template <typename __TArg>
2262  {
2263  __size = 0;
2264  __fastpassflag = false;
2265  __data = nullptr;
2266  }
2267 
2268  template <typename __TArg>
2269  inline __TArg* WriteOnlyArray<__TArg, 1>::AllocateAndZeroInitialize(unsigned int __countArg)
2270  {
2271  __TArg* __dest = nullptr;
2272  if (__countArg == 0)
2273  {
2274  return __dest;
2275  }
2276 
2277  if (static_cast<unsigned int>(-1) / sizeof(__TArg) < __countArg)
2278  {
2279  __abi_WinRTraiseInvalidCastException();
2280  }
2281  __dest = (__TArg*)__Platform_CoTaskMemAlloc(__countArg * sizeof(__TArg));
2282  if (__dest == nullptr)
2283  {
2284  __abi_WinRTraiseOutOfMemoryException();
2285  }
2286 
2287  __Platform_memset(__dest, 0, __countArg * sizeof(__TArg));
2288  return __dest;
2289  }
2290 
2291  template <typename __TArg>
2292  inline __TArg* WriteOnlyArray<__TArg, 1>::AllocateAndCopyElements(const __TArg* __srcArg, unsigned int __countArg)
2293  {
2294  __TArg* __dest = AllocateAndZeroInitialize(__countArg);
2295  for (unsigned int __i = 0; __i < __countArg; ++__i)
2296  {
2297  __dest[__i] = __srcArg[__i];
2298  }
2299  return __dest;
2300  }
2301 #pragma endregion
2302 
2303 #pragma region ::Platform::Array
2304  template <typename __TArg>
2305  inline Array<__TArg, 1>::Array() : WriteOnlyArray<__TArg, 1>()
2306  {
2307  *reinterpret_cast<void**>(static_cast< ::Platform::IValueType^ >(this)) =
2308  Details::GetIBoxArrayVtable(reinterpret_cast<void*>(static_cast< ::Platform::IBoxArray<__TArg>^ >(this)));
2309  }
2310 
2311  template <typename __TArg>
2312  inline Array<__TArg, 1>::Array(const Array<__TArg, 1>^ __source) : WriteOnlyArray<__TArg, 1>(__source ? __source->Data : nullptr, __source ? __source->Length : 0)
2313  {
2314  *reinterpret_cast<void**>(static_cast< ::Platform::IValueType^ >(this)) =
2315  Details::GetIBoxArrayVtable(reinterpret_cast<void*>(static_cast< ::Platform::IBoxArray<__TArg>^ >(this)));
2316  }
2317 
2318  template <typename __TArg>
2319  inline Array<__TArg, 1>::Array(unsigned int __sizeArg) : WriteOnlyArray<__TArg, 1>(__sizeArg)
2320  {
2321  *reinterpret_cast<void**>(static_cast< ::Platform::IValueType^ >(this)) =
2322  Details::GetIBoxArrayVtable(reinterpret_cast<void*>(static_cast< ::Platform::IBoxArray<__TArg>^ >(this)));
2323  }
2324 
2325  template <typename __TArg>
2326  inline Array<__TArg, 1>::Array(__TArg* __dataArg, unsigned int __sizeArg) : WriteOnlyArray<__TArg, 1>(__dataArg, __sizeArg)
2327  {
2328  *reinterpret_cast<void**>(static_cast< ::Platform::IValueType^ >(this)) =
2329  Details::GetIBoxArrayVtable(reinterpret_cast<void*>(static_cast< ::Platform::IBoxArray<__TArg>^>(this)));
2330  }
2331 
2332  template <typename T>
2333  inline T& Array<T, 1>::get(unsigned int __positionArg) const
2334  {
2335  return WriteOnlyArray<T, 1>::get(__positionArg);
2336  }
2337 
2338 #if defined(_PREFIX_) || defined(_PREFAST_)
2339  template <typename T>
2340  inline T& Array<T, 1>::operator[](unsigned int __positionArg) const
2341  {
2342  return WriteOnlyArray<T, 1>::operator[](__positionArg);
2343  }
2344 #endif // defined(_PREFIX_) || defined(_PREFAST_)
2345 
2346  template <typename __TArg>
2347  inline Array<__TArg, 1>^ Array<__TArg, 1>::Value::get()
2348  {
2349  return this;
2350  }
2351 
2352  template <typename __TArg>
2353  inline void Array<__TArg, 1>::Attach(__TArg* __srcArg, unsigned int __sizeArg)
2354  {
2355  // Precondition:
2356  // default constructed object
2357  // Postcondition:
2358  // _data = src
2359  // _size = size
2360  // _fastpassflag = false
2361  // _refcount = 1
2362 
2363  if (__size == 0 && __data == nullptr)
2364  {
2365  __size = __sizeArg;
2366  __fastpassflag = false;
2367  __data = __srcArg;
2368  return;
2369  }
2370 
2371  __abi_WinRTraiseFailureException();
2372  }
2373 
2374  template <typename __TArg>
2375  inline void Array<__TArg, 1>::AttachFastPass(__TArg* __srcArg, unsigned int __sizeArg)
2376  {
2377  // Precondition:
2378  // default constructed object
2379  // Postcondition:
2380  // _data = src
2381  // _size = size
2382  // _fastpassflag = true
2383 
2384  if (__size == 0 && __data == nullptr)
2385  {
2386  __size = __sizeArg;
2387  __fastpassflag = true;
2388  __data = __srcArg;
2389  return;
2390  }
2391 
2392  __abi_WinRTraiseFailureException();
2393  }
2394 
2395  template <typename __TArg>
2396  inline void Array<__TArg, 1>::CopyToOrDetach(__TArg** __destArg, unsigned int* __sizeArg)
2397  {
2398  // Postcondition:
2399  // if (_refcount == 1 && !_fastpassflag)
2400  // *dest = _data
2401  // *size = _size
2402  // Clear()
2403  // if (_refcount > 1 || _fastpassflag)
2404  // *dest = new buffer with contents of _data
2405  // *size = _size
2406 
2407  if ((__destArg == nullptr) || (__sizeArg == nullptr))
2408  {
2409  __abi_WinRTraiseNullReferenceException();
2410  }
2411 
2412  if (this->__size == 0)
2413  {
2414  *__destArg = nullptr;
2415  *__sizeArg = 0;
2416  return;
2417  }
2418 
2419  if(this->__data == nullptr)
2420  {
2421  __abi_WinRTraiseFailureException();
2422  }
2423 
2424  if (!this->__fastpassflag && this->__abi_reference_count.Get() == 1)
2425  {
2426  *__destArg = this->__data;
2427  *__sizeArg = this->__size;
2428  this->Clear();
2429  }
2430  else if (this->__fastpassflag || this->__abi_reference_count.Get() > 1)
2431  {
2432  *__destArg = this->AllocateAndCopyElements(this->__data, this->__size);
2433  *__sizeArg = this->__size;
2434  }
2435  else
2436  {
2437  __abi_WinRTraiseFailureException();
2438  }
2439  }
2440 
2441 #pragma endregion
2442 
2443 #pragma region Array iterators
2444  template<class __TArg>
2445  __TArg * begin(const Array<__TArg, 1>^ __arrArg)
2446  {
2447  return __arrArg->begin();
2448  }
2449 
2450  template<class __TArg>
2451  __TArg * end(const Array<__TArg, 1>^ __arrArg)
2452  {
2453  return __arrArg->end();
2454  }
2455 #pragma endregion
2456 } // namespace Platform {
2457 #pragma endregion
2458 
2459 namespace Platform
2460 {
2461  namespace Details
2462  {
2463 #if !defined(VCWINRT_DLL)
2464  __declspec(dllimport) void __stdcall EventSourceInitialize(void**);
2465  __declspec(dllimport) void __stdcall EventSourceUninitialize(void**);
2466  __declspec(dllimport) void* __stdcall EventSourceGetTargetArray(void*, EventLock*);
2467  __declspec(dllimport) unsigned int __stdcall EventSourceGetTargetArraySize(void*);
2468  __declspec(dllimport) void* __stdcall EventSourceGetTargetArrayEvent(void*, unsigned int, const void*, __int64*);
2469  __declspec(dllimport) ::Windows::Foundation::EventRegistrationToken __stdcall EventSourceAdd(void**, EventLock*, ::Platform::Delegate^);
2470  __declspec(dllimport) void __stdcall EventSourceRemove(void**, EventLock*, ::Windows::Foundation::EventRegistrationToken);
2471  __declspec(dllimport) __abi_IUnknown* __stdcall GetWeakReference(const volatile ::Platform::Object^ const other);
2472  __declspec(dllimport) __declspec(no_refcount) ::Platform::Object^ __stdcall ResolveWeakReference(const ::_GUID& guid, __abi_IUnknown** weakRef);
2473 #else
2474  __declspec(dllexport) void __stdcall EventSourceInitialize(void**);
2475  __declspec(dllexport) void __stdcall EventSourceUninitialize(void**);
2476  __declspec(dllexport) void* __stdcall EventSourceGetTargetArray(void*, EventLock*);
2477  __declspec(dllexport) unsigned int __stdcall EventSourceGetTargetArraySize(void*);
2478  __declspec(dllexport) void* __stdcall EventSourceGetTargetArrayEvent(void*, unsigned int, const void*, __int64*);
2479  __declspec(dllexport) ::Windows::Foundation::EventRegistrationToken __stdcall EventSourceAdd(void**, EventLock*, ::Platform::Delegate^);
2480  __declspec(dllexport) void __stdcall EventSourceRemove(void**, EventLock*, ::Windows::Foundation::EventRegistrationToken);
2481  __declspec(dllexport) __abi_IUnknown* __stdcall GetWeakReference(const volatile ::Platform::Object^ const other);
2482  __declspec(dllexport) __declspec(no_refcount) ::Platform::Object^ __stdcall ResolveWeakReference(const ::_GUID& guid, __abi_IUnknown** weakRef);
2483 #endif
2484  } // Details
2485 
2487  {
2488  public:
2490  {
2491  Details::EventSourceInitialize(&__targets);
2492  }
2493 
2495  {
2496  Details::EventSourceUninitialize(&__targets);
2497  }
2498 
2499  ::Windows::Foundation::EventRegistrationToken Add(Details::EventLock* __lockArg, ::Platform::Object^ __delegateInterfaceArg)
2500  {
2501  return Details::EventSourceAdd(&__targets, __lockArg, reinterpret_cast< ::Platform::Delegate^>(__delegateInterfaceArg));
2502  }
2503 
2504  void Remove(Details::EventLock* __lockArg, ::Windows::Foundation::EventRegistrationToken __tokenArg)
2505  {
2506  Details::EventSourceRemove(&__targets, __lockArg, __tokenArg);
2507  }
2508  private:
2509  // __TInvokeMethod is a functor that performs the appropriate invoke, depending on the
2510  // number of arguments specified.
2511  template <typename __TDelegate, typename __TReturnType, typename __TInvokeMethod>
2512  typename __TReturnType DoInvoke(Details::EventLock* __lockArg, __TInvokeMethod __invokeOneArg)
2513  {
2514  // lock pointer exhange
2515  // targets = _targets
2516  // unlock pointer exhange
2517  // iterate all targets and do invoke
2518 
2519  // The _targetsPointerLock protects the acquisition of an AddRef'd pointer to
2520  // "current list". An Add/Remove operation may occur during the
2521  // firing of events (but occurs on a copy of the list). i.e. both
2522  // DoInvoke/invoke and Add/Remove are readers of the "current list".
2523  // NOTE: EventSource::Invoke(...) must never take the _addRemoveLock.
2524  ::Platform::Object^ __targetsLoc;
2525  // Attaching Array without AddRef'ing
2526  *reinterpret_cast<void**>(&__targetsLoc) = Details::EventSourceGetTargetArray(__targets, __lockArg);
2527 
2528  typename __TReturnType __returnVal = typename __TReturnType();
2529  // The list may not exist if nobody has registered
2530  if (__targetsLoc != nullptr)
2531  {
2532  const unsigned int __size = Details::EventSourceGetTargetArraySize(reinterpret_cast<void*>(__targetsLoc));
2533 
2534  for (unsigned int __index = 0; __index < __size; __index++)
2535  {
2536  ::Windows::Foundation::EventRegistrationToken __token = {};
2537 
2538  try
2539  {
2540  __TDelegate^ __element;
2541  *reinterpret_cast<void**>(&__element) = Details::EventSourceGetTargetArrayEvent(
2542  reinterpret_cast<void*>(__targetsLoc),
2543  __index,
2544  reinterpret_cast<const void*>(&__uuidof(__TDelegate^)),
2545  &__token.Value
2546  );
2547 
2548  __returnVal = (__invokeOneArg)(__element);
2549  }
2550  catch(::Platform::Exception^ e)
2551  {
2552  int __hr = e->HResult;
2553  if (__hr == 0x800706BA /* HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) */
2554  || __hr == 0x80010108 /* RPC_E_DISCONNECTED */
2555  || __hr == 0x89020001 /* JSCRIPT_E_CANTEXECUTE */)
2556  {
2557  Details::EventSourceRemove(&__targets, __lockArg, __token);
2558  }
2559  else
2560  {
2561  throw e;
2562  }
2563  }
2564  }
2565  }
2566  return __returnVal;
2567  }
2568 
2569  // __TInvokeMethod is a functor that performs the appropriate invoke, depending on the
2570  // number of arguments specified.
2571  template <typename __TDelegate, typename __TInvokeMethod>
2572  void DoInvokeVoid(Details::EventLock* __lockArg, __TInvokeMethod __invokeOneArg)
2573  {
2574  // lock pointer exhange
2575  // targets = _targets
2576  // unlock pointer exhange
2577  // iterate all targets and do invoke
2578 
2579  // The _targetsPointerLock protects the acquisition of an AddRef'd pointer to
2580  // "current list". An Add/Remove operation may occur during the
2581  // firing of events (but occurs on a copy of the list). i.e. both
2582  // Invoke/invoke and Add/Remove are readers of the "current list".
2583  // NOTE: EventSource::Invoke(...) must never take the _addRemoveLock.
2584  ::Platform::Object^ __targetsLoc;
2585  // Attaching Array without AddRef'ing
2586  *reinterpret_cast<void**>(&__targetsLoc) = Details::EventSourceGetTargetArray(__targets, __lockArg);
2587 
2588  // The list may not exist if nobody has registered
2589  if (__targetsLoc != nullptr)
2590  {
2591  const unsigned int __size = Details::EventSourceGetTargetArraySize(reinterpret_cast<void*>(__targetsLoc));
2592 
2593  for (unsigned int __index = 0; __index < __size; __index++)
2594  {
2595  ::Windows::Foundation::EventRegistrationToken __token = {};
2596 
2597  try
2598  {
2599  __TDelegate^ __element;
2600  *reinterpret_cast<void**>(&__element) = Details::EventSourceGetTargetArrayEvent(
2601  reinterpret_cast<void*>(__targetsLoc),
2602  __index,
2603  reinterpret_cast<const void*>(&__uuidof(__TDelegate^)),
2604  &__token.Value
2605  );
2606 
2607  (__invokeOneArg)(__element);
2608  }
2609  catch(::Platform::Exception^ e)
2610  {
2611  int __hr = e->HResult;
2612  if (__hr == 0x800706BA /* HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) */
2613  || __hr == 0x80010108 /* RPC_E_DISCONNECTED */
2614  || __hr == 0x89020001 /* JSCRIPT_E_CANTEXECUTE */)
2615  {
2616  Details::EventSourceRemove(&__targets, __lockArg, __token);
2617  }
2618  else
2619  {
2620  throw e;
2621  }
2622  }
2623  }
2624  }
2625  }
2626 
2627  public:
2628  template < typename __TLambda, typename... __TArgs >
2629  void InvokeVoid(Details::EventLock* __lockArg, __TArgs... __args)
2630  {
2631  DoInvokeVoid<__TLambda>(__lockArg, [__args...](__TLambda^ __lambda) -> void { __lambda(__args...); });
2632  }
2633 
2634  template < typename __TLambda, typename __TReturnType, typename... __TArgs >
2635  typename __TReturnType Invoke(Details::EventLock* __lockArg, __TArgs... __args)
2636  {
2637  return DoInvoke<__TLambda, __TReturnType>(__lockArg, [__args...](__TLambda^ __lambda) -> typename __TReturnType { return __lambda(__args...); });
2638  }
2639 
2640  protected:
2641  void* __targets;
2642  };
2643 
2644  class Module
2645  {
2646  public:
2647  typedef void (__stdcall *UnregisterCallback)();
2648  static ::Platform::Object^ __stdcall RegisterFactories(UnregisterCallback callback = nullptr);
2649  static void __stdcall RunServer(const ::default::char16* __serverName = nullptr);
2650  static ::Platform::Details::IActivationFactory^ __stdcall GetActivationFactory(::Platform::String^);
2651  static bool __stdcall CanUnloadNow();
2652  static void __stdcall FlushFactoryCache();
2653  };
2654 
2655  inline ::default::int32 Exception::HResult::get()
2656  {
2657  return __hresult;
2658  }
2659 
2661  {
2662  private:
2663  mutable __abi_IUnknown* __weakPtr;
2664 
2666  {
2667  if (__weakPtr != nullptr)
2668  {
2669  __weakPtr->__abi_AddRef();
2670  }
2671  }
2672 
2674  {
2675  __abi_IUnknown* __tmp = __weakPtr;
2676  if (__tmp != nullptr)
2677  {
2678  __weakPtr = nullptr;
2679  __tmp->__abi_Release();
2680  }
2681  }
2682  public:
2683  struct BoolStruct
2684  {
2685  int Member;
2686  };
2687 
2688  typedef int BoolStruct::* BoolType;
2689 
2690  WeakReference() throw() : __weakPtr(nullptr)
2691  {
2692  }
2693 
2694  WeakReference(decltype(__nullptr)) throw() : __weakPtr(nullptr)
2695  {
2696  }
2697 
2698  WeakReference(const WeakReference& __otherArg) throw() : __weakPtr(__otherArg.__weakPtr)
2699  {
2700  InternalAddRef();
2701  }
2702 
2703  WeakReference(WeakReference&& __otherArg) throw() : __weakPtr(__otherArg.__weakPtr)
2704  {
2705  __otherArg.__weakPtr = nullptr;
2706  }
2707 
2708  explicit WeakReference(const volatile ::Platform::Object^ const __otherArg) : __weakPtr(nullptr)
2709  {
2710  __weakPtr = Details::GetWeakReference(__otherArg);
2711  }
2712 
2713  ~WeakReference() throw()
2714  {
2715  InternalRelease();
2716  }
2717 
2718  WeakReference& operator=(decltype(__nullptr)) throw()
2719  {
2720  InternalRelease();
2721  return *this;
2722  }
2723 
2724  WeakReference& operator=(const WeakReference& __otherArg) throw()
2725  {
2726  if (&__otherArg != this)
2727  {
2728  InternalRelease();
2729  __weakPtr = __otherArg.__weakPtr;
2730  InternalAddRef();
2731  }
2732  return *this;
2733  }
2734 
2735  WeakReference& operator=(WeakReference&& __otherArg) throw()
2736  {
2737  InternalRelease();
2738  __weakPtr = __otherArg.__weakPtr;
2739  __otherArg.__weakPtr = nullptr;
2740  return *this;
2741  }
2742 
2743  WeakReference& operator=(const volatile ::Platform::Object^ const __otherArg)
2744  {
2745  __abi_IUnknown* __weakPtrLoc = Details::GetWeakReference(__otherArg);
2746  InternalRelease();
2747  __weakPtr = __weakPtrLoc;
2748  return *this;
2749  }
2750 
2751  template<typename __TArg>
2752  __declspec(no_refcount)
2753  __TArg^ Resolve() const
2754  {
2755  return reinterpret_cast<__TArg^>(Details::ResolveWeakReference(__uuidof(__TArg^), &__weakPtr));
2756  }
2757 
2758  operator BoolType() const throw()
2759  {
2760  return __weakPtr != nullptr ? &BoolStruct::Member : nullptr;
2761  }
2762 
2763  friend bool operator==(const WeakReference&, const WeakReference&) throw();
2764  friend bool operator==(const WeakReference&, decltype(__nullptr)) throw();
2765  friend bool operator==(decltype(__nullptr), const WeakReference&) throw();
2766  friend bool operator!=(const WeakReference&, const WeakReference&) throw();
2767  friend bool operator!=(const WeakReference&, decltype(__nullptr)) throw();
2768  friend bool operator!=(decltype(__nullptr), const WeakReference&) throw();
2769  friend bool operator<(const WeakReference&, const WeakReference&) throw();
2770  };
2771 
2772  inline bool operator==(const WeakReference& __aArg, const WeakReference& __bArg) throw()
2773  {
2774  return __aArg.__weakPtr == __bArg.__weakPtr;
2775  }
2776 
2777  inline bool operator==(const WeakReference& __aArg, decltype(__nullptr)) throw()
2778  {
2779  return __aArg.__weakPtr == nullptr;
2780  }
2781 
2782  inline bool operator==(decltype(__nullptr), const WeakReference& __bArg) throw()
2783  {
2784  return __bArg.__weakPtr == nullptr;
2785  }
2786 
2787  inline bool operator!=(const WeakReference& __aArg, const WeakReference& __bArg) throw()
2788  {
2789  return __aArg.__weakPtr != __bArg.__weakPtr;
2790  }
2791 
2792  inline bool operator!=(const WeakReference& __aArg, decltype(__nullptr)) throw()
2793  {
2794  return __aArg.__weakPtr != nullptr;
2795  }
2796 
2797  inline bool operator!=(decltype(__nullptr), const WeakReference& __bArg) throw()
2798  {
2799  return __bArg.__weakPtr != nullptr;
2800  }
2801 
2802  inline bool operator<(const WeakReference& __aArg, const WeakReference& __bArg) throw()
2803  {
2804  return __aArg.__weakPtr < __bArg.__weakPtr;
2805  }
2806 } // namespace Platform
2807 
2808 namespace Windows { namespace Foundation
2809 {
2810  inline Point::Point(float __xArg, float __yArg) : X(__xArg), Y(__yArg)
2811  {
2812  }
2813 
2814  inline bool Point::operator ==(Point __point1Arg, Point __point2Arg)
2815  {
2816  return __point1Arg.X == __point2Arg.X && __point1Arg.Y == __point2Arg.Y;
2817  }
2818 
2819  inline bool Point::operator !=(Point __point1Arg, Point __point2Arg)
2820  {
2821  return !(__point1Arg == __point2Arg);
2822  }
2823 
2824  // Size
2825  inline Size::Size(float __widthArg, float __heightArg)
2826  {
2827  if (__widthArg < 0 || __heightArg < 0)
2828  {
2829  __abi_WinRTraiseInvalidArgumentException();
2830  }
2831 
2832  Width = __widthArg;
2833  Height = __heightArg;
2834  }
2835 
2836  inline bool Size::IsEmpty::get()
2837  {
2838  return Width < 0;
2839  }
2840 
2841  inline bool Size::operator ==(Size __size1Arg, Size __size2Arg)
2842  {
2843  return __size1Arg.Height == __size2Arg.Height && __size1Arg.Width == __size2Arg.Width;
2844  }
2845 
2846  inline bool Size::operator !=(Size __size1Arg, Size __size2Arg)
2847  {
2848  return !(__size1Arg == __size2Arg);
2849  }
2850 
2851  inline Rect::Rect(float __xArg, float __yArg, float __widthArg, float __heightArg)
2852  {
2853  if (__widthArg < 0 || __heightArg < 0)
2854  {
2855  __abi_WinRTraiseInvalidArgumentException();
2856  }
2857 
2858  X = __xArg;
2859  Y = __yArg;
2860  Width = __widthArg;
2861  Height = __heightArg;
2862  }
2863 
2864  inline bool Rect::IsEmpty::get()
2865  {
2866  return Width < 0;
2867  }
2868 
2869  inline float Rect::Left::get()
2870  {
2871  return X;
2872  }
2873 
2874  inline float Rect::Top::get()
2875  {
2876  return Y;
2877  }
2878 
2879  inline bool Rect::operator ==(Rect __rect1Arg, Rect __rect2Arg)
2880  {
2881  return __rect1Arg.X == __rect2Arg.X
2882  && __rect1Arg.Y == __rect2Arg.Y
2883  && __rect1Arg.Width == __rect2Arg.Width
2884  && __rect1Arg.Height == __rect2Arg.Height;
2885  }
2886 
2887  inline bool Rect::operator !=(Rect __rect1Arg, Rect __rect2Arg)
2888  {
2889  return !(__rect1Arg == __rect2Arg);
2890  }
2891 } } // namespace Windows::Foundation
2892 
2893 namespace Windows { namespace UI { namespace Xaml
2894 {
2895  inline Thickness::Thickness(double __uniformLengthArg)
2896  {
2897  Left = Top = Right = Bottom = __uniformLengthArg;
2898  }
2899 
2900  inline Thickness::Thickness(double __leftArg, double __topArg, double __rightArg, double __bottomArg)
2901  {
2902  Left = __leftArg;
2903  Top = __topArg;
2904  Right = __rightArg;
2905  Bottom = __bottomArg;
2906  }
2907 
2908  inline bool Thickness::operator==(Thickness __thickness1Arg, Thickness __thickness2Arg)
2909  {
2910  return __thickness1Arg.Left == __thickness2Arg.Left &&
2911  __thickness1Arg.Top == __thickness2Arg.Top &&
2912  __thickness1Arg.Right == __thickness2Arg.Right &&
2913  __thickness1Arg.Bottom == __thickness2Arg.Bottom;
2914  }
2915 
2916  inline bool Thickness::operator!=(Thickness __thickness1Arg, Thickness __thickness2Arg)
2917  {
2918  return !(__thickness1Arg == __thickness2Arg);
2919  }
2920 
2921  inline CornerRadius::CornerRadius(double __uniformRadiusArg)
2922  {
2923  TopLeft = TopRight = BottomRight = BottomLeft = __uniformRadiusArg;
2924  }
2925 
2926  inline CornerRadius::CornerRadius(double __topLeftArg, double __topRightArg, double __bottomRightArg, double __bottomLeftArg)
2927  {
2928  TopLeft = __topLeftArg;
2929  TopRight = __topRightArg;
2930  BottomRight = __bottomRightArg;
2931  BottomLeft = __bottomLeftArg;
2932  }
2933 
2934  inline bool CornerRadius::operator==(CornerRadius __cornerRadius1Arg, CornerRadius __cornerRadius2Arg)
2935  {
2936  return __cornerRadius1Arg.TopLeft == __cornerRadius2Arg.TopLeft &&
2937  __cornerRadius1Arg.TopRight == __cornerRadius2Arg.TopRight &&
2938  __cornerRadius1Arg.BottomRight == __cornerRadius2Arg.BottomRight &&
2939  __cornerRadius1Arg.BottomLeft == __cornerRadius2Arg.BottomLeft;
2940  }
2941 
2942  inline bool CornerRadius::operator!=(CornerRadius __cornerRadius1Arg, CornerRadius __cornerRadius2Arg)
2943  {
2944  return !(__cornerRadius1Arg == __cornerRadius2Arg);
2945  }
2946 
2947  namespace Media
2948  {
2949  inline Matrix Matrix::Identity::get()
2950  {
2951  return Matrix(1, 0, 0, 1, 0, 0);
2952  }
2953 
2954  inline bool Matrix::IsIdentity::get()
2955  {
2956  return M11 == 1 &&
2957  M12 == 0 &&
2958  M21 == 0 &&
2959  M22 == 1 &&
2960  OffsetX == 0 &&
2961  OffsetY == 0;
2962  }
2963 
2964  inline Windows::Foundation::Point Matrix::Transform(Windows::Foundation::Point __pointArg)
2965  {
2966  float x = __pointArg.X;
2967  float y = __pointArg.Y;
2968  double num = (y * M21) + OffsetX;
2969  double num2 = (x * M12) + OffsetY;
2970  x *= (float)M11;
2971  x += (float)num;
2972  y *= (float)M22;
2973  y += (float)num2;
2974  return Windows::Foundation::Point(x, y);
2975  }
2976 
2977  inline Matrix::Matrix(double __m11Arg, double __m12Arg, double __m21Arg, double __m22Arg, double __offsetXArg, double __offsetYArg)
2978  {
2979  M11 = __m11Arg;
2980  M12 = __m12Arg;
2981  M21 = __m21Arg;
2982  M22 = __m22Arg;
2983  OffsetX = __offsetXArg;
2984  OffsetY = __offsetYArg;
2985  }
2986 
2987  inline bool Matrix::operator==(Matrix __matrix1Arg, Matrix __matrix2Arg)
2988  {
2989  return
2990  __matrix1Arg.M11 == __matrix2Arg.M11 &&
2991  __matrix1Arg.M12 == __matrix2Arg.M12 &&
2992  __matrix1Arg.M21 == __matrix2Arg.M21 &&
2993  __matrix1Arg.M22 == __matrix2Arg.M22 &&
2994  __matrix1Arg.OffsetX == __matrix2Arg.OffsetX &&
2995  __matrix1Arg.OffsetY == __matrix2Arg.OffsetY;
2996  }
2997 
2998  inline bool Matrix::operator!=(Matrix __matrix1Arg, Matrix __matrix2Arg)
2999  {
3000  return !(__matrix1Arg == __matrix2Arg);
3001  }
3002 
3003  namespace Media3D
3004  {
3005  inline Matrix3D Matrix3D::Identity::get()
3006  {
3007  return Matrix3D(1, 0, 0, 0,
3008  0, 1, 0, 0,
3009  0, 0, 1, 0,
3010  0, 0, 0, 1);
3011  }
3012 
3013  inline bool Matrix3D::IsIdentity::get()
3014  {
3015  return M11 == 1 && M12 == 0 && M13 == 0 && M14 == 0 &&
3016  M21 == 0 && M22 == 1 && M23 == 0 && M24 == 0 &&
3017  M31 == 0 && M32 == 0 && M33 == 1 && M34 == 0 &&
3018  OffsetX == 0 && OffsetY == 0 && OffsetZ == 0 && M44 == 1;
3019  }
3020 
3021  inline Matrix3D::Matrix3D(double __m11Arg, double __m12Arg, double __m13Arg, double __m14Arg,
3022  double __m21Arg, double __m22Arg, double __m23Arg, double __m24Arg,
3023  double __m31Arg, double __m32Arg, double __m33Arg, double __m34Arg,
3024  double __offsetXArg, double __offsetYArg, double __offsetZArg, double __m44Arg)
3025  {
3026  M11 = __m11Arg;
3027  M12 = __m12Arg;
3028  M13 = __m13Arg;
3029  M14 = __m14Arg;
3030  M21 = __m21Arg;
3031  M22 = __m22Arg;
3032  M23 = __m23Arg;
3033  M24 = __m24Arg;
3034  M31 = __m31Arg;
3035  M32 = __m32Arg;
3036  M33 = __m33Arg;
3037  M34 = __m34Arg;
3038  OffsetX = __offsetXArg;
3039  OffsetY = __offsetYArg;
3040  OffsetZ = __offsetZArg;
3041  M44 = __m44Arg;
3042  }
3043 
3044  inline bool Matrix3D::operator==(Matrix3D __matrix1Arg, Matrix3D __matrix2Arg)
3045  {
3046  return
3047  __matrix1Arg.M11 == __matrix2Arg.M11 &&
3048  __matrix1Arg.M12 == __matrix2Arg.M12 &&
3049  __matrix1Arg.M13 == __matrix2Arg.M13 &&
3050  __matrix1Arg.M14 == __matrix2Arg.M14 &&
3051  __matrix1Arg.M21 == __matrix2Arg.M21 &&
3052  __matrix1Arg.M22 == __matrix2Arg.M22 &&
3053  __matrix1Arg.M23 == __matrix2Arg.M23 &&
3054  __matrix1Arg.M24 == __matrix2Arg.M24 &&
3055  __matrix1Arg.M31 == __matrix2Arg.M31 &&
3056  __matrix1Arg.M32 == __matrix2Arg.M32 &&
3057  __matrix1Arg.M33 == __matrix2Arg.M33 &&
3058  __matrix1Arg.M34 == __matrix2Arg.M34 &&
3059  __matrix1Arg.OffsetX == __matrix2Arg.OffsetX &&
3060  __matrix1Arg.OffsetY == __matrix2Arg.OffsetY &&
3061  __matrix1Arg.OffsetZ == __matrix2Arg.OffsetZ &&
3062  __matrix1Arg.M44 == __matrix2Arg.M44;
3063  }
3064 
3065  inline bool Matrix3D::operator!=(Matrix3D __matrix1Arg, Matrix3D __matrix2Arg)
3066  {
3067  return !(__matrix1Arg == __matrix2Arg);
3068  }
3069  } // Media3D
3070 
3071  namespace Animation
3072  {
3073  inline KeyTime::KeyTime(Windows::Foundation::TimeSpan __timeSpanArg)
3074  {
3075  if (__timeSpanArg.Duration < 0 )
3076  {
3077  __abi_WinRTraiseInvalidArgumentException();
3078  }
3079  TimeSpan = __timeSpanArg;
3080  }
3081 
3082  inline bool KeyTime::operator==(KeyTime __keyTime1Arg, KeyTime __keyTime2Arg)
3083  {
3084  return __keyTime1Arg.TimeSpan.Duration == __keyTime2Arg.TimeSpan.Duration;
3085  }
3086 
3087  inline bool KeyTime::operator!=(KeyTime __keyTime1Arg, KeyTime __keyTime2Arg)
3088  {
3089  return !(__keyTime1Arg == __keyTime2Arg);
3090  }
3091 
3092  inline RepeatBehavior::RepeatBehavior(Windows::Foundation::TimeSpan __durationArg)
3093  {
3094  if (__durationArg.Duration < 0 )
3095  {
3096  __abi_WinRTraiseInvalidArgumentException();
3097  }
3098 
3099  __duration = __durationArg;
3100  __count = 0.0;
3101  __type = RepeatBehaviorType::Duration;
3102  }
3103 
3104  inline double RepeatBehavior::Count::get()
3105  {
3106  return __count;
3107  }
3108 
3109  inline Windows::Foundation::TimeSpan RepeatBehavior::Duration::get()
3110  {
3111  return __duration;
3112  }
3113 
3114  inline RepeatBehaviorType RepeatBehavior::Type::get()
3115  {
3116  return __type;
3117  }
3118 
3119  inline RepeatBehavior RepeatBehavior::Forever::get()
3120  {
3121  RepeatBehavior forever;
3122  Windows::Foundation::TimeSpan ts = {0};
3123  forever.__duration = ts;
3124  forever.__count = 0.0;
3125  forever.__type = RepeatBehaviorType::Forever;
3126 
3127  return forever;
3128  }
3129 
3130  inline bool RepeatBehavior::HasCount::get()
3131  {
3132  return __type == RepeatBehaviorType::Count;
3133  }
3134 
3135  inline bool RepeatBehavior::HasDuration::get()
3136  {
3137  return __type == RepeatBehaviorType::Duration;
3138  }
3139 
3140 
3141  inline bool RepeatBehavior::operator ==(RepeatBehavior __repeatBehavior1Arg, RepeatBehavior __repeatBehavior2Arg)
3142  {
3143  if (__repeatBehavior1Arg.__type == __repeatBehavior2Arg.__type)
3144  {
3145  switch (__repeatBehavior1Arg.__type)
3146  {
3147  case RepeatBehaviorType::Forever:
3148  return true;
3149 
3150  case RepeatBehaviorType::Count:
3151  return __repeatBehavior1Arg.__count == __repeatBehavior2Arg.__count;
3152 
3153  case RepeatBehaviorType::Duration:
3154 
3155  return __repeatBehavior1Arg.__duration.Duration == __repeatBehavior2Arg.__duration.Duration;
3156 
3157  default:
3158  return false;
3159  }
3160  }
3161  else
3162  {
3163  return false;
3164  }
3165  }
3166 
3167  inline bool RepeatBehavior::operator !=(RepeatBehavior __repeatBehavior1Arg, RepeatBehavior __repeatBehavior2Arg)
3168  {
3169  return !(__repeatBehavior1Arg == __repeatBehavior2Arg);
3170  }
3171 
3172  } // Animation
3173  } // Media
3174 
3175  inline Duration::Duration(Windows::Foundation::TimeSpan __timeSpanArg)
3176  {
3177  __durationType = DurationType::TimeSpan;
3178  __timeSpan = __timeSpanArg;
3179  }
3180 
3181  inline bool Duration::operator ==(Duration __t1Arg, Duration __t2Arg)
3182  {
3183  if (__t1Arg.HasTimeSpan)
3184  {
3185  if (__t2Arg.HasTimeSpan)
3186  {
3187  return __t1Arg.__timeSpan.Duration == __t2Arg.__timeSpan.Duration;
3188  }
3189  else
3190  {
3191  return false;
3192  }
3193  }
3194  else
3195  {
3196  return __t1Arg.__durationType == __t2Arg.__durationType;
3197  }
3198  }
3199 
3200  inline bool Duration::operator !=(Duration __t1Arg, Duration __t2Arg)
3201  {
3202  return !(__t1Arg == __t2Arg);
3203  }
3204 
3205  inline bool Duration::HasTimeSpan::get()
3206  {
3207  return (__durationType == DurationType::TimeSpan);
3208  }
3209 
3210  inline Duration Duration::Automatic::get()
3211  {
3212  Duration __duration;
3213  __duration.__durationType = DurationType::Automatic;
3214 
3215  return __duration;
3216  }
3217 
3218  inline Duration Duration::Forever::get()
3219  {
3220  Duration __duration;
3221  __duration.__durationType = DurationType::Forever;
3222 
3223  return __duration;
3224  }
3225 
3226  inline Windows::Foundation::TimeSpan Duration::TimeSpan::get()
3227  {
3228  if (HasTimeSpan)
3229  {
3230  return __timeSpan;
3231  }
3232  else
3233  {
3234  Windows::Foundation::TimeSpan __timeSpanLoc;
3235  __timeSpanLoc.Duration = 0;
3236  return __timeSpanLoc;
3237  }
3238  }
3239 
3240  inline GridLength::GridLength(double __pixelsArg)
3241  {
3242  *this = GridLength(__pixelsArg, Windows::UI::Xaml::GridUnitType::Pixel);
3243  }
3244 
3245  inline double GridLength::Value::get()
3246  {
3247  return (__unitType == Windows::UI::Xaml::GridUnitType::Auto ) ? GridLength(1.0, Windows::UI::Xaml::GridUnitType::Auto).__unitValue : __unitValue;
3248  }
3249 
3250  inline Windows::UI::Xaml::GridUnitType GridLength::GridUnitType::get()
3251  {
3252  return (__unitType);
3253  }
3254 
3255  inline bool GridLength::IsAbsolute::get()
3256  {
3257  return (__unitType == Windows::UI::Xaml::GridUnitType::Pixel);
3258  }
3259 
3260  inline bool GridLength::IsAuto::get()
3261  {
3262  return (__unitType == Windows::UI::Xaml::GridUnitType::Auto);
3263  }
3264 
3265  inline bool GridLength::IsStar::get()
3266  {
3267  return (__unitType == Windows::UI::Xaml::GridUnitType::Star) ;
3268  }
3269 
3270  inline GridLength GridLength::Auto::get()
3271  {
3272  return ( GridLength(1.0, Windows::UI::Xaml::GridUnitType::Auto));
3273  }
3274 
3275  inline bool GridLength::operator ==(GridLength __gridLength1Arg, GridLength __gridLength2Arg)
3276  {
3277  if (__gridLength1Arg.GridUnitType == __gridLength2Arg.GridUnitType)
3278  {
3279  if (__gridLength1Arg.IsAuto || __gridLength1Arg.__unitValue == __gridLength2Arg.__unitValue)
3280  {
3281  return true;
3282  }
3283  }
3284  return false;
3285  }
3286 
3287  inline bool GridLength::operator !=(GridLength __gridLength1Arg, GridLength __gridLength2Arg)
3288  {
3289  return !(__gridLength1Arg == __gridLength2Arg);
3290  }
3291 } } } // Windows::UI::Xaml
3292 
3293 // Don't pull in any symbols if it's vccorlib compiled
3294 #if !defined(VCWINRT_DLL)
3295 #ifdef _WINRT_DLL
3296  // DLL
3297  #ifdef _M_IX86
3298  #pragma comment(linker, "/EXPORT:DllGetActivationFactory=_DllGetActivationFactory@8,PRIVATE")
3299  #pragma comment(linker, "/EXPORT:DllCanUnloadNow=_DllCanUnloadNow@0,PRIVATE")
3300  #else
3301  #pragma comment(linker, "/EXPORT:DllGetActivationFactory=DllGetActivationFactory,PRIVATE")
3302  #pragma comment(linker, "/EXPORT:DllCanUnloadNow,PRIVATE")
3303  #endif
3304 #else
3305  #ifdef _M_IX86
3306  #pragma comment(linker, "/INCLUDE:___abi__initialize")
3307  #else
3308  #pragma comment(linker, "/INCLUDE:__abi__initialize")
3309  #endif // _M_IX86
3310 #endif // _WINRT_DLL
3311 
3312 #if defined(_DEBUG)
3313  #pragma comment(lib, "vccorlibd.lib")
3314 #else
3315  #pragma comment(lib, "vccorlib.lib")
3316 #endif // DEBUG
3317 #endif // !defined(VCWINRT_DLL)
3318 
3319 #pragma pack(pop)
3320 
3321 #pragma initialize_winrt_types_done
3322 
3323 // Restore warnings disabled for this file to their original settings
3324 #pragma warning( pop )
3325 
3326 #if defined(__VCCORLIB_H_ENABLE_ALL_WARNINGS)
3327 #pragma warning(pop)
3328 #endif
3329 
3330 #endif // _VCCORLIB_H_
WeakReference & operator=(const WeakReference &__otherArg)
Definition: vccorlib.h:2724
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:1972
void(__stdcall * UnregisterCallback)()
Definition: vccorlib.h:2647
WeakReference()
Definition: vccorlib.h:2690
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:1565
unsigned int __length
Definition: vccorlib.h:300
int numcalls_AddRef
Definition: vccorlib.h:129
Definition: vccorlib.h:1456
Definition: vccorlib.h:865
unsigned long Decrement() volatile
Definition: vccorlib.h:249
reference_wrapper< _Ty > ref(_Ty &_Val) _NOEXCEPT
Definition: type_traits:1617
Platform::String ToStringInternal< false >()
Definition: vccorlib.h:1450
~WeakReference()
Definition: vccorlib.h:2713
StringReference()
Definition: vccorlib.h:1232
__TReturnType DoInvoke(Details::EventLock *__lockArg, __TInvokeMethod __invokeOneArg)
Definition: vccorlib.h:2512
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:2118
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:2024
::Platform::Object __boxValue
Definition: vccorlib.h:1523
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:2683
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:2499
constexpr _Ty & get(array< _Ty, _Size > &_Arr) _NOEXCEPT
Definition: array:493
const ::default::char16 * end(::Platform::String^__strArg)
Definition: vccorlib.h:1957
__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:2045
WeakReference(const WeakReference &__otherArg)
Definition: vccorlib.h:2698
__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:2644
long(__stdcall *__factoryCreator)(unsigned int *
__declspec(no_refcount) __TArg^Resolve() const
Definition: vccorlib.h:2752
__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 **)
__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:1952
friend bool operator==(const WeakReference &, const WeakReference &)
Definition: vccorlib.h:2772
CustomEnum Type
Definition: vccorlib.h:1473
friend bool operator<(const WeakReference &, const WeakReference &)
Definition: vccorlib.h:2802
__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:2468
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:2663
__declspec(selectany)
Definition: vccorlib.h:1684
__abi_CapturePtr()
Definition: vccorlib.h:869
int numcalls_Release
Definition: vccorlib.h:130
~EventSource()
Definition: vccorlib.h:2494
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:2057
void ReleaseControlBlock() volatile
Definition: vccorlib.h:268
WeakReference(WeakReference &&__otherArg)
Definition: vccorlib.h:2703
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:2673
CustomValueType Type
Definition: vccorlib.h:1467
ArrayReference(ArrayReference &&__otherArg)
Definition: vccorlib.h:2106
WeakReference & operator=(const volatile::Platform::Object^const __otherArg)
Definition: vccorlib.h:2743
int numcalls_GetRuntimeClassName
Definition: vccorlib.h:132
Definition: vccorlib.h:565
Definition: vccorlib.h:117
WeakReference(decltype(__nullptr))
Definition: vccorlib.h:2694
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:2660
_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:2641
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:1703
void CreateString(const ::default::char16 *__bufferArg, unsigned int __lengthArg, __abi_HSTRING *__destArg)
Definition: vccorlib.h:1197
unsigned int __stdcall __Platform_WindowsGetStringLen(__abi_HSTRING)
void InternalAddRef()
Definition: vccorlib.h:2665
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
const volatile::Platform::String __pSourceArg auto __pRaw
Definition: vccorlib.h:1346
void Init(const StringReference &__fstrArg)
Definition: vccorlib.h:1297
#define false
Definition: stdbool.h:16
void InvokeVoid(Details::EventLock *__lockArg, __TArgs...__args)
Definition: vccorlib.h:2629
static void DestructElementsAndFree(__TArg *__srcArg, unsigned int __countArg)
Definition: vccorlib.h:2066
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:2797
bool operator==(decltype(__nullptr), const WeakReference &__bArg)
Definition: vccorlib.h:2782
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
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
__interface __declspec(uuid("00000035-0000-0000-C000-000000000046")) __abi_IActivationFactory
Definition: vccorlib.h:286
void Init(__TArg *__dataArg, unsigned int __sizeArg, bool __needsInitArg=false)
Definition: vccorlib.h:2082
bool __bSingleAllocation
Definition: vccorlib.h:623
int(__stdcall *__getTrustLevel)()
void * __detach_as_voidptr(void **__ppObjArg)
Definition: vccorlib.h:535
WeakReference & operator=(decltype(__nullptr))
Definition: vccorlib.h:2718
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:2802
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:2635
__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:2489
HSTRING__ * __abi_HSTRING
Definition: vccorlib.h:85
__abi_FTMWeakRefData * GetFreeThreadedMarshaler()
Definition: vccorlib.h:792
ArrayReference & operator=(ArrayReference &&__otherArg)
Definition: vccorlib.h:2112
Definition: vccorlib.h:1501
unsigned long __stdcall DecrementStrongReference()
Definition: vccorlib.h:666
void DoInvokeVoid(Details::EventLock *__lockArg, __TInvokeMethod __invokeOneArg)
Definition: vccorlib.h:2572
__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:1509
__declspec(dllimport) IUnknown *__stdcall GetObjectContext()
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *unexpected_handler)()
ArrayReference(__TArg *__dataArg, unsigned int __sizeArg, bool __needsInitArg=false)
Definition: vccorlib.h:2101
friend bool operator!=(const WeakReference &, const WeakReference &)
Definition: vccorlib.h:2787
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:1709
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:2445
~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:2504
WeakReference & operator=(WeakReference &&__otherArg)
Definition: vccorlib.h:2735
int BoolStruct::* BoolType
Definition: vccorlib.h:2688
static bool __stdcall CanUnloadNow()
StringReference(const ::default::char16 *__strArg)
Definition: vccorlib.h:1250
int Member
Definition: vccorlib.h:2685
Definition: vccorlib.h:297
long __stdcall __abi_QueryInterface(::Platform::Guid &__guid, void **__pOut)
Definition: vccorlib.h:1745
CustomBox(T value)
Definition: vccorlib.h:1415
WeakReference(const volatile::Platform::Object^const __otherArg)
Definition: vccorlib.h:2708
unsigned int __size
Definition: vccorlib.h:922
Definition: set:42
Definition: vccorlib.h:2486
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:2451
__declspec(non_user_code) __abi_dtor_helper(const volatile
Definition: vccorlib.h:438
int numcalls_GetIids
Definition: vccorlib.h:131