8 #ifndef __REQUIRED_RPCNDR_H_VERSION__
9 #define __REQUIRED_RPCNDR_H_VERSION__ 500
13 #ifndef __REQUIRED_RPCSAL_H_VERSION__
14 #define __REQUIRED_RPCSAL_H_VERSION__ 100
20 #ifndef __RPCNDR_H_VERSION__
21 #error this stub requires an updated version of <rpcndr.h>
24 #ifndef COM_NO_WINDOWS_H
29 #ifndef __weakreference_h__
30 #define __weakreference_h__
34 #if defined(_MSC_VER) && defined(__clang__)
35 #pragma clang diagnostic push
36 #pragma clang diagnostic ignored "-Wlanguage-extension-token"
41 #ifndef __IWeakReference_FWD_DEFINED__
42 # define __IWeakReference_FWD_DEFINED__
47 #ifndef __IWeakReferenceSource_FWD_DEFINED__
48 # define __IWeakReferenceSource_FWD_DEFINED__
54 #include "inspectable.h"
70 #ifndef __IWeakReference_INTERFACE_DEFINED__
71 # define __IWeakReference_INTERFACE_DEFINED__
76 # if (_MSC_VER >= 1600) && defined(__cplusplus) && !defined(CINTERFACE)
79 MIDL_INTERFACE(
"00000037-0000-0000-C000-000000000046")
83 virtual HRESULT STDMETHODCALLTYPE Resolve(
84 __RPC__in REFIID riid,
85 __RPC__deref_out IInspectable * *objectReference) = 0;
90 _At_(*objectReference, _When_(FAILED(
return), _Null_))
91 _At_(*objectReference, _When_(SUCCEEDED(
return), _Maybenull_)) HRESULT
92 Resolve(_Out_ T * *objectReference)
95 __is_base_of(IInspectable, T),
"Only Windows Runtime interfaces can be resolved by weak reference");
96 return Resolve(__uuidof(T), (IInspectable**)objectReference);
104 # if defined(__cplusplus) && !defined(CINTERFACE)
106 MIDL_INTERFACE(
"00000037-0000-0000-C000-000000000046")
110 virtual HRESULT STDMETHODCALLTYPE Resolve(
111 __RPC__in REFIID riid,
112 __RPC__deref_out_opt IInspectable * *objectReference) = 0;
123 HRESULT(STDMETHODCALLTYPE* QueryInterface)
125 __RPC__in REFIID
riid,
127 _COM_Outptr_
void** ppvObject);
133 HRESULT(STDMETHODCALLTYPE* Resolve)
148 # define IWeakReference_QueryInterface(This, riid, ppvObject) \
149 ((This)->lpVtbl->QueryInterface(This, riid, ppvObject))
151 # define IWeakReference_AddRef(This) ((This)->lpVtbl->AddRef(This))
153 # define IWeakReference_Release(This) ((This)->lpVtbl->Release(This))
155 # define IWeakReference_Resolve(This, riid, objectReference) \
156 ((This)->lpVtbl->Resolve(This, riid, objectReference))
172 #ifndef __IWeakReferenceSource_INTERFACE_DEFINED__
173 # define __IWeakReferenceSource_INTERFACE_DEFINED__
180 # if defined(__cplusplus) && !defined(CINTERFACE)
182 MIDL_INTERFACE(
"00000038-0000-0000-C000-000000000046")
186 virtual HRESULT STDMETHODCALLTYPE GetWeakReference(
198 HRESULT(STDMETHODCALLTYPE* QueryInterface)
200 __RPC__in REFIID riid,
202 _COM_Outptr_
void** ppvObject);
208 HRESULT(STDMETHODCALLTYPE* GetWeakReference)
222 # define IWeakReferenceSource_QueryInterface(This, riid, ppvObject) \
223 ((This)->lpVtbl->QueryInterface(This, riid, ppvObject))
225 # define IWeakReferenceSource_AddRef(This) ((This)->lpVtbl->AddRef(This))
227 # define IWeakReferenceSource_Release(This) ((This)->lpVtbl->Release(This))
229 # define IWeakReferenceSource_GetWeakReference(This, weakReference) \
230 ((This)->lpVtbl->GetWeakReference(This, weakReference))
246 #if defined(_MSC_VER) && defined(__clang__)
247 # pragma clang diagnostic pop
Definition: weakreference.h:195
ULONG(STDMETHODCALLTYPE *Release)(__RPC__in IWeakReferenceSource *This)
__RPC__in IWeakReferenceSource * This
Definition: weakreference.h:209
BEGIN_INTERFACE(__RPC__in IWeakReferenceSource *This, __RPC__in REFIID riid, _COM_Outptr_ void **ppvObject)
ULONG(STDMETHODCALLTYPE *AddRef)(__RPC__in IWeakReferenceSource *This)
__RPC__in IWeakReferenceSource __RPC__deref_out_opt IWeakReference ** weakReference
Definition: weakreference.h:210
Definition: weakreference.h:120
BEGIN_INTERFACE(__RPC__in IWeakReference *This, __RPC__in REFIID riid, _COM_Outptr_ void **ppvObject)
__RPC__in IWeakReference * This
Definition: weakreference.h:134
__RPC__in IWeakReference __RPC__in REFIID __RPC__deref_out_opt IInspectable ** objectReference
Definition: weakreference.h:136
ULONG(STDMETHODCALLTYPE *AddRef)(__RPC__in IWeakReference *This)
__RPC__in IWeakReference __RPC__in REFIID riid
Definition: weakreference.h:135
ULONG(STDMETHODCALLTYPE *Release)(__RPC__in IWeakReference *This)
RPC_IF_HANDLE __MIDL_itf_weakreference_0000_0000_v0_0_c_ifspec
RPC_IF_HANDLE __MIDL_itf_weakreference_0000_0001_v0_0_c_ifspec
struct IWeakReferenceSourceVtbl IWeakReferenceSourceVtbl
interface IWeakReferenceSource IWeakReferenceSource
Definition: weakreference.h:49
EXTERN_C const IID IID_IWeakReference
Definition: weakreference.h:102
interface IWeakReference IWeakReference
Definition: weakreference.h:43
RPC_IF_HANDLE __MIDL_itf_weakreference_0000_0001_v0_0_s_ifspec
struct IWeakReferenceVtbl IWeakReferenceVtbl
EXTERN_C const IID IID_IWeakReferenceSource
Definition: weakreference.h:178
RPC_IF_HANDLE __MIDL_itf_weakreference_0000_0000_v0_0_s_ifspec