Nui
weakreference.h
Go to the documentation of this file.
1 
2 /* this ALWAYS GENERATED file contains the definitions for the interfaces */
3 
4 /* File created by MIDL compiler version 8.01.0622 */
5 /* @@MIDL_FILE_HEADING( ) */
6 
7 /* verify that the <rpcndr.h> version is high enough to compile this file*/
8 #ifndef __REQUIRED_RPCNDR_H_VERSION__
9 #define __REQUIRED_RPCNDR_H_VERSION__ 500
10 #endif
11 
12 /* verify that the <rpcsal.h> version is high enough to compile this file*/
13 #ifndef __REQUIRED_RPCSAL_H_VERSION__
14 #define __REQUIRED_RPCSAL_H_VERSION__ 100
15 #endif
16 
17 #include "rpc.h"
18 #include "rpcndr.h"
19 
20 #ifndef __RPCNDR_H_VERSION__
21 #error this stub requires an updated version of <rpcndr.h>
22 #endif /* __RPCNDR_H_VERSION__ */
23 
24 #ifndef COM_NO_WINDOWS_H
25 #include "windows.h"
26 #include "ole2.h"
27 #endif /*COM_NO_WINDOWS_H*/
28 
29 #ifndef __weakreference_h__
30 #define __weakreference_h__
31 
32 #pragma once
33 
34 #if defined(_MSC_VER) && defined(__clang__)
35 #pragma clang diagnostic push
36 #pragma clang diagnostic ignored "-Wlanguage-extension-token"
37 #endif
38 
39 /* Forward Declarations */
40 
41 #ifndef __IWeakReference_FWD_DEFINED__
42 # define __IWeakReference_FWD_DEFINED__
43 typedef interface IWeakReference IWeakReference;
44 
45 #endif /* __IWeakReference_FWD_DEFINED__ */
46 
47 #ifndef __IWeakReferenceSource_FWD_DEFINED__
48 # define __IWeakReferenceSource_FWD_DEFINED__
50 
51 #endif /* __IWeakReferenceSource_FWD_DEFINED__ */
52 
53 /* header files for imported files */
54 #include "inspectable.h"
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 /* interface __MIDL_itf_weakreference_0000_0000 */
61 /* [local] */
62 
63 // Microsoft Windows
64 // Copyright (c) Microsoft Corporation. All rights reserved.
65 #pragma once
66 
69 
70 #ifndef __IWeakReference_INTERFACE_DEFINED__
71 # define __IWeakReference_INTERFACE_DEFINED__
72 
73  /* interface IWeakReference */
74  /* [unique][uuid][object] */
75 
76 # if (_MSC_VER >= 1600) && defined(__cplusplus) && !defined(CINTERFACE)
77  EXTERN_C const IID IID_IWeakReference;
78  extern "C++" {
79  MIDL_INTERFACE("00000037-0000-0000-C000-000000000046")
80  IWeakReference : public IUnknown
81  {
82  public:
83  virtual HRESULT STDMETHODCALLTYPE Resolve(
84  /* [in] */ __RPC__in REFIID riid,
85  /* [iid_is][out] */ __RPC__deref_out IInspectable * *objectReference) = 0;
86 
87  virtual ~IWeakReference() = default;
88 
89  template <typename T>
90  _At_(*objectReference, _When_(FAILED(return), _Null_))
91  _At_(*objectReference, _When_(SUCCEEDED(return), _Maybenull_)) HRESULT
92  Resolve(_Out_ T * *objectReference)
93  {
94  static_assert(
95  __is_base_of(IInspectable, T), "Only Windows Runtime interfaces can be resolved by weak reference");
96  return Resolve(__uuidof(T), (IInspectable**)objectReference);
97  }
98  };
99  } // extern C++
100 # else
101 
102  EXTERN_C const IID IID_IWeakReference;
103 
104 # if defined(__cplusplus) && !defined(CINTERFACE)
105 
106  MIDL_INTERFACE("00000037-0000-0000-C000-000000000046")
107  IWeakReference : public IUnknown
108  {
109  public:
110  virtual HRESULT STDMETHODCALLTYPE Resolve(
111  /* [in] */ __RPC__in REFIID riid,
112  /* [iid_is][retval][out] */ __RPC__deref_out_opt IInspectable * *objectReference) = 0;
113 
114  virtual ~IWeakReference();
115  };
116 
117 # else /* C style interface */
118 
119  typedef struct IWeakReferenceVtbl
120  {
122 
123  HRESULT(STDMETHODCALLTYPE* QueryInterface)
124  (__RPC__in IWeakReference* This,
125  /* [in] */ __RPC__in REFIID riid,
126  /* [annotation][iid_is][out] */
127  _COM_Outptr_ void** ppvObject);
128 
129  ULONG(STDMETHODCALLTYPE* AddRef)(__RPC__in IWeakReference* This);
130 
131  ULONG(STDMETHODCALLTYPE* Release)(__RPC__in IWeakReference* This);
132 
133  HRESULT(STDMETHODCALLTYPE* Resolve)
134  (__RPC__in IWeakReference* This,
135  /* [in] */ __RPC__in REFIID riid,
136  /* [iid_is][retval][out] */ __RPC__deref_out_opt IInspectable** objectReference);
137 
138  END_INTERFACE
140 
141  interface IWeakReference
142  {
143  CONST_VTBL struct IWeakReferenceVtbl* lpVtbl;
144  };
145 
146 # ifdef COBJMACROS
147 
148 # define IWeakReference_QueryInterface(This, riid, ppvObject) \
149  ((This)->lpVtbl->QueryInterface(This, riid, ppvObject))
150 
151 # define IWeakReference_AddRef(This) ((This)->lpVtbl->AddRef(This))
152 
153 # define IWeakReference_Release(This) ((This)->lpVtbl->Release(This))
154 
155 # define IWeakReference_Resolve(This, riid, objectReference) \
156  ((This)->lpVtbl->Resolve(This, riid, objectReference))
157 
158 # endif /* COBJMACROS */
159 
160 # endif /* C style interface */
161 
162 # endif /* __IWeakReference_INTERFACE_DEFINED__ */
163 
164  /* interface __MIDL_itf_weakreference_0000_0001 */
165  /* [local] */
166 
167 #endif
168 
171 
172 #ifndef __IWeakReferenceSource_INTERFACE_DEFINED__
173 # define __IWeakReferenceSource_INTERFACE_DEFINED__
174 
175  /* interface IWeakReferenceSource */
176  /* [unique][uuid][object] */
177 
178  EXTERN_C const IID IID_IWeakReferenceSource;
179 
180 # if defined(__cplusplus) && !defined(CINTERFACE)
181 
182  MIDL_INTERFACE("00000038-0000-0000-C000-000000000046")
183  IWeakReferenceSource : public IUnknown
184  {
185  public:
186  virtual HRESULT STDMETHODCALLTYPE GetWeakReference(
187  /* [retval][out] */ __RPC__deref_out_opt IWeakReference * *weakReference) = 0;
188 
189  virtual ~IWeakReferenceSource() = default;
190  };
191 
192 # else /* C style interface */
193 
195  {
197 
198  HRESULT(STDMETHODCALLTYPE* QueryInterface)
199  (__RPC__in IWeakReferenceSource* This,
200  /* [in] */ __RPC__in REFIID riid,
201  /* [annotation][iid_is][out] */
202  _COM_Outptr_ void** ppvObject);
203 
204  ULONG(STDMETHODCALLTYPE* AddRef)(__RPC__in IWeakReferenceSource* This);
205 
206  ULONG(STDMETHODCALLTYPE* Release)(__RPC__in IWeakReferenceSource* This);
207 
208  HRESULT(STDMETHODCALLTYPE* GetWeakReference)
210  /* [retval][out] */ __RPC__deref_out_opt IWeakReference** weakReference);
211 
212  END_INTERFACE
214 
215  interface IWeakReferenceSource
216  {
217  CONST_VTBL struct IWeakReferenceSourceVtbl* lpVtbl;
218  };
219 
220 # ifdef COBJMACROS
221 
222 # define IWeakReferenceSource_QueryInterface(This, riid, ppvObject) \
223  ((This)->lpVtbl->QueryInterface(This, riid, ppvObject))
224 
225 # define IWeakReferenceSource_AddRef(This) ((This)->lpVtbl->AddRef(This))
226 
227 # define IWeakReferenceSource_Release(This) ((This)->lpVtbl->Release(This))
228 
229 # define IWeakReferenceSource_GetWeakReference(This, weakReference) \
230  ((This)->lpVtbl->GetWeakReference(This, weakReference))
231 
232 # endif /* COBJMACROS */
233 
234 # endif /* C style interface */
235 
236 #endif /* __IWeakReferenceSource_INTERFACE_DEFINED__ */
237 
238  /* Additional Prototypes for ALL interfaces */
239 
240  /* end of Additional Prototypes */
241 
242 #ifdef __cplusplus
243 }
244 #endif
245 
246 #if defined(_MSC_VER) && defined(__clang__)
247 # pragma clang diagnostic pop
248 #endif
249 
250 #endif
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