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