Get rid of the COMMDLG_hInstance variables.
[wine] / include / objidl.h
1 /*** Autogenerated by WIDL 0.1 from objidl.idl - Do not edit ***/
2 #include "rpc.h"
3 #include "rpcndr.h"
4
5 #ifndef __WIDL_OBJIDL_H
6 #define __WIDL_OBJIDL_H
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 #include "unknwn.h"
11 typedef struct IStream IStream;
12 typedef struct IStream16 IStream16;
13 typedef struct IEnumString IEnumString;
14 typedef struct IRunningObjectTable IRunningObjectTable;
15 typedef struct IMoniker IMoniker;
16 typedef struct IAdviseSink IAdviseSink;
17 typedef struct IAsyncManager IAsyncManager;
18 typedef struct IMarshal IMarshal;
19 typedef IMarshal *LPMARSHAL;
20
21 /*****************************************************************************
22  * IMarshal interface
23  */
24 DEFINE_GUID(IID_IMarshal, 0x00000003, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
25 #if defined(__cplusplus) && !defined(CINTERFACE)
26 struct IMarshal : public IUnknown
27 {
28     virtual HRESULT STDMETHODCALLTYPE GetUnmarshalClass(
29         REFIID riid,
30         void* pv,
31         DWORD dwDestContext,
32         void* pvDestContext,
33         DWORD mshlflags,
34         CLSID* pCid) = 0;
35
36     virtual HRESULT STDMETHODCALLTYPE GetMarshalSizeMax(
37         REFIID riid,
38         void* pv,
39         DWORD dwDestContext,
40         void* pvDestContext,
41         DWORD mshlflags,
42         DWORD* pSize) = 0;
43
44     virtual HRESULT STDMETHODCALLTYPE MarshalInterface(
45         IStream* pStm,
46         REFIID riid,
47         void* pv,
48         DWORD dwDestContext,
49         void* pvDestContext,
50         DWORD mshlflags) = 0;
51
52     virtual HRESULT STDMETHODCALLTYPE UnmarshalInterface(
53         IStream* pStm,
54         REFIID riid,
55         void** ppv) = 0;
56
57     virtual HRESULT STDMETHODCALLTYPE ReleaseMarshalData(
58         IStream* pStm) = 0;
59
60     virtual HRESULT STDMETHODCALLTYPE DisconnectObject(
61         DWORD dwReserved) = 0;
62
63 };
64 #else
65 typedef struct IMarshalVtbl IMarshalVtbl;
66 struct IMarshal {
67     const IMarshalVtbl* lpVtbl;
68 };
69 struct IMarshalVtbl {
70     ICOM_MSVTABLE_COMPAT_FIELDS
71
72     /*** IUnknown methods ***/
73     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
74         IMarshal* This,
75         REFIID riid,
76         void** ppvObject);
77
78     ULONG (STDMETHODCALLTYPE *AddRef)(
79         IMarshal* This);
80
81     ULONG (STDMETHODCALLTYPE *Release)(
82         IMarshal* This);
83
84     /*** IMarshal methods ***/
85     HRESULT (STDMETHODCALLTYPE *GetUnmarshalClass)(
86         IMarshal* This,
87         REFIID riid,
88         void* pv,
89         DWORD dwDestContext,
90         void* pvDestContext,
91         DWORD mshlflags,
92         CLSID* pCid);
93
94     HRESULT (STDMETHODCALLTYPE *GetMarshalSizeMax)(
95         IMarshal* This,
96         REFIID riid,
97         void* pv,
98         DWORD dwDestContext,
99         void* pvDestContext,
100         DWORD mshlflags,
101         DWORD* pSize);
102
103     HRESULT (STDMETHODCALLTYPE *MarshalInterface)(
104         IMarshal* This,
105         IStream* pStm,
106         REFIID riid,
107         void* pv,
108         DWORD dwDestContext,
109         void* pvDestContext,
110         DWORD mshlflags);
111
112     HRESULT (STDMETHODCALLTYPE *UnmarshalInterface)(
113         IMarshal* This,
114         IStream* pStm,
115         REFIID riid,
116         void** ppv);
117
118     HRESULT (STDMETHODCALLTYPE *ReleaseMarshalData)(
119         IMarshal* This,
120         IStream* pStm);
121
122     HRESULT (STDMETHODCALLTYPE *DisconnectObject)(
123         IMarshal* This,
124         DWORD dwReserved);
125
126 };
127
128 /*** IUnknown methods ***/
129 #define IMarshal_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
130 #define IMarshal_AddRef(p) (p)->lpVtbl->AddRef(p)
131 #define IMarshal_Release(p) (p)->lpVtbl->Release(p)
132 /*** IMarshal methods ***/
133 #define IMarshal_GetUnmarshalClass(p,a,b,c,d,e,f) (p)->lpVtbl->GetUnmarshalClass(p,a,b,c,d,e,f)
134 #define IMarshal_GetMarshalSizeMax(p,a,b,c,d,e,f) (p)->lpVtbl->GetMarshalSizeMax(p,a,b,c,d,e,f)
135 #define IMarshal_MarshalInterface(p,a,b,c,d,e,f) (p)->lpVtbl->MarshalInterface(p,a,b,c,d,e,f)
136 #define IMarshal_UnmarshalInterface(p,a,b,c) (p)->lpVtbl->UnmarshalInterface(p,a,b,c)
137 #define IMarshal_ReleaseMarshalData(p,a) (p)->lpVtbl->ReleaseMarshalData(p,a)
138 #define IMarshal_DisconnectObject(p,a) (p)->lpVtbl->DisconnectObject(p,a)
139
140 #endif
141
142 #define IMarshal_METHODS \
143     ICOM_MSVTABLE_COMPAT_FIELDS \
144     /*** IUnknown methods ***/ \
145     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
146     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
147     STDMETHOD_(ULONG,Release)(THIS) PURE; \
148     /*** IMarshal methods ***/ \
149     STDMETHOD_(HRESULT,GetUnmarshalClass)(THIS_ REFIID riid, void* pv, DWORD dwDestContext, void* pvDestContext, DWORD mshlflags, CLSID* pCid) PURE; \
150     STDMETHOD_(HRESULT,GetMarshalSizeMax)(THIS_ REFIID riid, void* pv, DWORD dwDestContext, void* pvDestContext, DWORD mshlflags, DWORD* pSize) PURE; \
151     STDMETHOD_(HRESULT,MarshalInterface)(THIS_ IStream* pStm, REFIID riid, void* pv, DWORD dwDestContext, void* pvDestContext, DWORD mshlflags) PURE; \
152     STDMETHOD_(HRESULT,UnmarshalInterface)(THIS_ IStream* pStm, REFIID riid, void** ppv) PURE; \
153     STDMETHOD_(HRESULT,ReleaseMarshalData)(THIS_ IStream* pStm) PURE; \
154     STDMETHOD_(HRESULT,DisconnectObject)(THIS_ DWORD dwReserved) PURE;
155
156 HRESULT CALLBACK IMarshal_GetUnmarshalClass_Proxy(
157     IMarshal* This,
158     REFIID riid,
159     void* pv,
160     DWORD dwDestContext,
161     void* pvDestContext,
162     DWORD mshlflags,
163     CLSID* pCid);
164 void __RPC_STUB IMarshal_GetUnmarshalClass_Stub(
165     struct IRpcStubBuffer* This,
166     struct IRpcChannelBuffer* pRpcChannelBuffer,
167     PRPC_MESSAGE pRpcMessage,
168     DWORD* pdwStubPhase);
169 HRESULT CALLBACK IMarshal_GetMarshalSizeMax_Proxy(
170     IMarshal* This,
171     REFIID riid,
172     void* pv,
173     DWORD dwDestContext,
174     void* pvDestContext,
175     DWORD mshlflags,
176     DWORD* pSize);
177 void __RPC_STUB IMarshal_GetMarshalSizeMax_Stub(
178     struct IRpcStubBuffer* This,
179     struct IRpcChannelBuffer* pRpcChannelBuffer,
180     PRPC_MESSAGE pRpcMessage,
181     DWORD* pdwStubPhase);
182 HRESULT CALLBACK IMarshal_MarshalInterface_Proxy(
183     IMarshal* This,
184     IStream* pStm,
185     REFIID riid,
186     void* pv,
187     DWORD dwDestContext,
188     void* pvDestContext,
189     DWORD mshlflags);
190 void __RPC_STUB IMarshal_MarshalInterface_Stub(
191     struct IRpcStubBuffer* This,
192     struct IRpcChannelBuffer* pRpcChannelBuffer,
193     PRPC_MESSAGE pRpcMessage,
194     DWORD* pdwStubPhase);
195 HRESULT CALLBACK IMarshal_UnmarshalInterface_Proxy(
196     IMarshal* This,
197     IStream* pStm,
198     REFIID riid,
199     void** ppv);
200 void __RPC_STUB IMarshal_UnmarshalInterface_Stub(
201     struct IRpcStubBuffer* This,
202     struct IRpcChannelBuffer* pRpcChannelBuffer,
203     PRPC_MESSAGE pRpcMessage,
204     DWORD* pdwStubPhase);
205 HRESULT CALLBACK IMarshal_ReleaseMarshalData_Proxy(
206     IMarshal* This,
207     IStream* pStm);
208 void __RPC_STUB IMarshal_ReleaseMarshalData_Stub(
209     struct IRpcStubBuffer* This,
210     struct IRpcChannelBuffer* pRpcChannelBuffer,
211     PRPC_MESSAGE pRpcMessage,
212     DWORD* pdwStubPhase);
213 HRESULT CALLBACK IMarshal_DisconnectObject_Proxy(
214     IMarshal* This,
215     DWORD dwReserved);
216 void __RPC_STUB IMarshal_DisconnectObject_Stub(
217     struct IRpcStubBuffer* This,
218     struct IRpcChannelBuffer* pRpcChannelBuffer,
219     PRPC_MESSAGE pRpcMessage,
220     DWORD* pdwStubPhase);
221
222 typedef struct IStdMarshalInfo IStdMarshalInfo;
223 typedef IStdMarshalInfo *LPSTDMARSHALINFO;
224
225 /*****************************************************************************
226  * IStdMarshalInfo interface
227  */
228 DEFINE_GUID(IID_IStdMarshalInfo, 0x00000018, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
229 #if defined(__cplusplus) && !defined(CINTERFACE)
230 struct IStdMarshalInfo : public IUnknown
231 {
232     virtual HRESULT STDMETHODCALLTYPE GetClassForHandler(
233         DWORD dwDestContext,
234         void* pvDestContext,
235         CLSID* pClsid) = 0;
236
237 };
238 #else
239 typedef struct IStdMarshalInfoVtbl IStdMarshalInfoVtbl;
240 struct IStdMarshalInfo {
241     const IStdMarshalInfoVtbl* lpVtbl;
242 };
243 struct IStdMarshalInfoVtbl {
244     ICOM_MSVTABLE_COMPAT_FIELDS
245
246     /*** IUnknown methods ***/
247     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
248         IStdMarshalInfo* This,
249         REFIID riid,
250         void** ppvObject);
251
252     ULONG (STDMETHODCALLTYPE *AddRef)(
253         IStdMarshalInfo* This);
254
255     ULONG (STDMETHODCALLTYPE *Release)(
256         IStdMarshalInfo* This);
257
258     /*** IStdMarshalInfo methods ***/
259     HRESULT (STDMETHODCALLTYPE *GetClassForHandler)(
260         IStdMarshalInfo* This,
261         DWORD dwDestContext,
262         void* pvDestContext,
263         CLSID* pClsid);
264
265 };
266
267 /*** IUnknown methods ***/
268 #define IStdMarshalInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
269 #define IStdMarshalInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
270 #define IStdMarshalInfo_Release(p) (p)->lpVtbl->Release(p)
271 /*** IStdMarshalInfo methods ***/
272 #define IStdMarshalInfo_GetClassForHandler(p,a,b,c) (p)->lpVtbl->GetClassForHandler(p,a,b,c)
273
274 #endif
275
276 #define IStdMarshalInfo_METHODS \
277     ICOM_MSVTABLE_COMPAT_FIELDS \
278     /*** IUnknown methods ***/ \
279     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
280     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
281     STDMETHOD_(ULONG,Release)(THIS) PURE; \
282     /*** IStdMarshalInfo methods ***/ \
283     STDMETHOD_(HRESULT,GetClassForHandler)(THIS_ DWORD dwDestContext, void* pvDestContext, CLSID* pClsid) PURE;
284
285 HRESULT CALLBACK IStdMarshalInfo_GetClassForHandler_Proxy(
286     IStdMarshalInfo* This,
287     DWORD dwDestContext,
288     void* pvDestContext,
289     CLSID* pClsid);
290 void __RPC_STUB IStdMarshalInfo_GetClassForHandler_Stub(
291     struct IRpcStubBuffer* This,
292     struct IRpcChannelBuffer* pRpcChannelBuffer,
293     PRPC_MESSAGE pRpcMessage,
294     DWORD* pdwStubPhase);
295
296 typedef struct IExternalConnection IExternalConnection;
297 typedef IExternalConnection *LPEXTERNALCONNECTION;
298
299 typedef enum tagEXTCONN {
300     EXTCONN_STRONG = 0x1,
301     EXTCONN_WEAK = 0x2,
302     EXTCONN_CALLABLE = 0x4
303 } EXTCONN;
304
305 /*****************************************************************************
306  * IExternalConnection interface
307  */
308 DEFINE_GUID(IID_IExternalConnection, 0x00000019, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
309 #if defined(__cplusplus) && !defined(CINTERFACE)
310 struct IExternalConnection : public IUnknown
311 {
312     virtual DWORD STDMETHODCALLTYPE AddConnection(
313         DWORD extconn,
314         DWORD reserved) = 0;
315
316     virtual DWORD STDMETHODCALLTYPE ReleaseConnection(
317         DWORD extconn,
318         DWORD reserved,
319         BOOL fLastReleaseCloses) = 0;
320
321 };
322 #else
323 typedef struct IExternalConnectionVtbl IExternalConnectionVtbl;
324 struct IExternalConnection {
325     const IExternalConnectionVtbl* lpVtbl;
326 };
327 struct IExternalConnectionVtbl {
328     ICOM_MSVTABLE_COMPAT_FIELDS
329
330     /*** IUnknown methods ***/
331     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
332         IExternalConnection* This,
333         REFIID riid,
334         void** ppvObject);
335
336     ULONG (STDMETHODCALLTYPE *AddRef)(
337         IExternalConnection* This);
338
339     ULONG (STDMETHODCALLTYPE *Release)(
340         IExternalConnection* This);
341
342     /*** IExternalConnection methods ***/
343     DWORD (STDMETHODCALLTYPE *AddConnection)(
344         IExternalConnection* This,
345         DWORD extconn,
346         DWORD reserved);
347
348     DWORD (STDMETHODCALLTYPE *ReleaseConnection)(
349         IExternalConnection* This,
350         DWORD extconn,
351         DWORD reserved,
352         BOOL fLastReleaseCloses);
353
354 };
355
356 /*** IUnknown methods ***/
357 #define IExternalConnection_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
358 #define IExternalConnection_AddRef(p) (p)->lpVtbl->AddRef(p)
359 #define IExternalConnection_Release(p) (p)->lpVtbl->Release(p)
360 /*** IExternalConnection methods ***/
361 #define IExternalConnection_AddConnection(p,a,b) (p)->lpVtbl->AddConnection(p,a,b)
362 #define IExternalConnection_ReleaseConnection(p,a,b,c) (p)->lpVtbl->ReleaseConnection(p,a,b,c)
363
364 #endif
365
366 #define IExternalConnection_METHODS \
367     ICOM_MSVTABLE_COMPAT_FIELDS \
368     /*** IUnknown methods ***/ \
369     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
370     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
371     STDMETHOD_(ULONG,Release)(THIS) PURE; \
372     /*** IExternalConnection methods ***/ \
373     STDMETHOD_(DWORD,AddConnection)(THIS_ DWORD extconn, DWORD reserved) PURE; \
374     STDMETHOD_(DWORD,ReleaseConnection)(THIS_ DWORD extconn, DWORD reserved, BOOL fLastReleaseCloses) PURE;
375
376 DWORD CALLBACK IExternalConnection_AddConnection_Proxy(
377     IExternalConnection* This,
378     DWORD extconn,
379     DWORD reserved);
380 void __RPC_STUB IExternalConnection_AddConnection_Stub(
381     struct IRpcStubBuffer* This,
382     struct IRpcChannelBuffer* pRpcChannelBuffer,
383     PRPC_MESSAGE pRpcMessage,
384     DWORD* pdwStubPhase);
385 DWORD CALLBACK IExternalConnection_ReleaseConnection_Proxy(
386     IExternalConnection* This,
387     DWORD extconn,
388     DWORD reserved,
389     BOOL fLastReleaseCloses);
390 void __RPC_STUB IExternalConnection_ReleaseConnection_Stub(
391     struct IRpcStubBuffer* This,
392     struct IRpcChannelBuffer* pRpcChannelBuffer,
393     PRPC_MESSAGE pRpcMessage,
394     DWORD* pdwStubPhase);
395
396 typedef struct IMultiQI IMultiQI;
397 typedef IMultiQI *LPMULTIQI;
398
399 typedef struct tagMULTI_QI {
400     const IID *pIID;
401     IUnknown *pItf;
402     HRESULT hr;
403 } MULTI_QI;
404
405 /*****************************************************************************
406  * IMultiQI interface
407  */
408 DEFINE_GUID(IID_IMultiQI, 0x00000020, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
409 #if defined(__cplusplus) && !defined(CINTERFACE)
410 struct IMultiQI : public IUnknown
411 {
412     virtual HRESULT STDMETHODCALLTYPE QueryMultipleInterfaces(
413         ULONG cMQIs,
414         MULTI_QI* pMQIs) = 0;
415
416 };
417 #else
418 typedef struct IMultiQIVtbl IMultiQIVtbl;
419 struct IMultiQI {
420     const IMultiQIVtbl* lpVtbl;
421 };
422 struct IMultiQIVtbl {
423     ICOM_MSVTABLE_COMPAT_FIELDS
424
425     /*** IUnknown methods ***/
426     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
427         IMultiQI* This,
428         REFIID riid,
429         void** ppvObject);
430
431     ULONG (STDMETHODCALLTYPE *AddRef)(
432         IMultiQI* This);
433
434     ULONG (STDMETHODCALLTYPE *Release)(
435         IMultiQI* This);
436
437     /*** IMultiQI methods ***/
438     HRESULT (STDMETHODCALLTYPE *QueryMultipleInterfaces)(
439         IMultiQI* This,
440         ULONG cMQIs,
441         MULTI_QI* pMQIs);
442
443 };
444
445 /*** IUnknown methods ***/
446 #define IMultiQI_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
447 #define IMultiQI_AddRef(p) (p)->lpVtbl->AddRef(p)
448 #define IMultiQI_Release(p) (p)->lpVtbl->Release(p)
449 /*** IMultiQI methods ***/
450 #define IMultiQI_QueryMultipleInterfaces(p,a,b) (p)->lpVtbl->QueryMultipleInterfaces(p,a,b)
451
452 #endif
453
454 #define IMultiQI_METHODS \
455     ICOM_MSVTABLE_COMPAT_FIELDS \
456     /*** IUnknown methods ***/ \
457     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
458     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
459     STDMETHOD_(ULONG,Release)(THIS) PURE; \
460     /*** IMultiQI methods ***/ \
461     STDMETHOD_(HRESULT,QueryMultipleInterfaces)(THIS_ ULONG cMQIs, MULTI_QI* pMQIs) PURE;
462
463 HRESULT CALLBACK IMultiQI_QueryMultipleInterfaces_Proxy(
464     IMultiQI* This,
465     ULONG cMQIs,
466     MULTI_QI* pMQIs);
467 void __RPC_STUB IMultiQI_QueryMultipleInterfaces_Stub(
468     struct IRpcStubBuffer* This,
469     struct IRpcChannelBuffer* pRpcChannelBuffer,
470     PRPC_MESSAGE pRpcMessage,
471     DWORD* pdwStubPhase);
472
473 typedef struct IMalloc IMalloc;
474 typedef IMalloc *LPMALLOC;
475
476 /*****************************************************************************
477  * IMalloc interface
478  */
479 DEFINE_GUID(IID_IMalloc, 0x00000002, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
480 #if defined(__cplusplus) && !defined(CINTERFACE)
481 struct IMalloc : public IUnknown
482 {
483     virtual LPVOID STDMETHODCALLTYPE Alloc(
484         ULONG cb) = 0;
485
486     virtual LPVOID STDMETHODCALLTYPE Realloc(
487         LPVOID pv,
488         ULONG cb) = 0;
489
490     virtual void STDMETHODCALLTYPE Free(
491         LPVOID pv) = 0;
492
493     virtual ULONG STDMETHODCALLTYPE GetSize(
494         LPVOID pv) = 0;
495
496     virtual int STDMETHODCALLTYPE DidAlloc(
497         LPVOID pv) = 0;
498
499     virtual void STDMETHODCALLTYPE HeapMinimize(
500         ) = 0;
501
502 };
503 #else
504 typedef struct IMallocVtbl IMallocVtbl;
505 struct IMalloc {
506     const IMallocVtbl* lpVtbl;
507 };
508 struct IMallocVtbl {
509     ICOM_MSVTABLE_COMPAT_FIELDS
510
511     /*** IUnknown methods ***/
512     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
513         IMalloc* This,
514         REFIID riid,
515         void** ppvObject);
516
517     ULONG (STDMETHODCALLTYPE *AddRef)(
518         IMalloc* This);
519
520     ULONG (STDMETHODCALLTYPE *Release)(
521         IMalloc* This);
522
523     /*** IMalloc methods ***/
524     LPVOID (STDMETHODCALLTYPE *Alloc)(
525         IMalloc* This,
526         ULONG cb);
527
528     LPVOID (STDMETHODCALLTYPE *Realloc)(
529         IMalloc* This,
530         LPVOID pv,
531         ULONG cb);
532
533     void (STDMETHODCALLTYPE *Free)(
534         IMalloc* This,
535         LPVOID pv);
536
537     ULONG (STDMETHODCALLTYPE *GetSize)(
538         IMalloc* This,
539         LPVOID pv);
540
541     int (STDMETHODCALLTYPE *DidAlloc)(
542         IMalloc* This,
543         LPVOID pv);
544
545     void (STDMETHODCALLTYPE *HeapMinimize)(
546         IMalloc* This);
547
548 };
549
550 /*** IUnknown methods ***/
551 #define IMalloc_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
552 #define IMalloc_AddRef(p) (p)->lpVtbl->AddRef(p)
553 #define IMalloc_Release(p) (p)->lpVtbl->Release(p)
554 /*** IMalloc methods ***/
555 #define IMalloc_Alloc(p,a) (p)->lpVtbl->Alloc(p,a)
556 #define IMalloc_Realloc(p,a,b) (p)->lpVtbl->Realloc(p,a,b)
557 #define IMalloc_Free(p,a) (p)->lpVtbl->Free(p,a)
558 #define IMalloc_GetSize(p,a) (p)->lpVtbl->GetSize(p,a)
559 #define IMalloc_DidAlloc(p,a) (p)->lpVtbl->DidAlloc(p,a)
560 #define IMalloc_HeapMinimize(p) (p)->lpVtbl->HeapMinimize(p)
561
562 #endif
563
564 #define IMalloc_METHODS \
565     ICOM_MSVTABLE_COMPAT_FIELDS \
566     /*** IUnknown methods ***/ \
567     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
568     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
569     STDMETHOD_(ULONG,Release)(THIS) PURE; \
570     /*** IMalloc methods ***/ \
571     STDMETHOD_(LPVOID,Alloc)(THIS_ ULONG cb) PURE; \
572     STDMETHOD_(LPVOID,Realloc)(THIS_ LPVOID pv, ULONG cb) PURE; \
573     STDMETHOD_(void,Free)(THIS_ LPVOID pv) PURE; \
574     STDMETHOD_(ULONG,GetSize)(THIS_ LPVOID pv) PURE; \
575     STDMETHOD_(int,DidAlloc)(THIS_ LPVOID pv) PURE; \
576     STDMETHOD_(void,HeapMinimize)(THIS) PURE;
577
578 LPVOID CALLBACK IMalloc_Alloc_Proxy(
579     IMalloc* This,
580     ULONG cb);
581 void __RPC_STUB IMalloc_Alloc_Stub(
582     struct IRpcStubBuffer* This,
583     struct IRpcChannelBuffer* pRpcChannelBuffer,
584     PRPC_MESSAGE pRpcMessage,
585     DWORD* pdwStubPhase);
586 LPVOID CALLBACK IMalloc_Realloc_Proxy(
587     IMalloc* This,
588     LPVOID pv,
589     ULONG cb);
590 void __RPC_STUB IMalloc_Realloc_Stub(
591     struct IRpcStubBuffer* This,
592     struct IRpcChannelBuffer* pRpcChannelBuffer,
593     PRPC_MESSAGE pRpcMessage,
594     DWORD* pdwStubPhase);
595 void CALLBACK IMalloc_Free_Proxy(
596     IMalloc* This,
597     LPVOID pv);
598 void __RPC_STUB IMalloc_Free_Stub(
599     struct IRpcStubBuffer* This,
600     struct IRpcChannelBuffer* pRpcChannelBuffer,
601     PRPC_MESSAGE pRpcMessage,
602     DWORD* pdwStubPhase);
603 ULONG CALLBACK IMalloc_GetSize_Proxy(
604     IMalloc* This,
605     LPVOID pv);
606 void __RPC_STUB IMalloc_GetSize_Stub(
607     struct IRpcStubBuffer* This,
608     struct IRpcChannelBuffer* pRpcChannelBuffer,
609     PRPC_MESSAGE pRpcMessage,
610     DWORD* pdwStubPhase);
611 int CALLBACK IMalloc_DidAlloc_Proxy(
612     IMalloc* This,
613     LPVOID pv);
614 void __RPC_STUB IMalloc_DidAlloc_Stub(
615     struct IRpcStubBuffer* This,
616     struct IRpcChannelBuffer* pRpcChannelBuffer,
617     PRPC_MESSAGE pRpcMessage,
618     DWORD* pdwStubPhase);
619 void CALLBACK IMalloc_HeapMinimize_Proxy(
620     IMalloc* This);
621 void __RPC_STUB IMalloc_HeapMinimize_Stub(
622     struct IRpcStubBuffer* This,
623     struct IRpcChannelBuffer* pRpcChannelBuffer,
624     PRPC_MESSAGE pRpcMessage,
625     DWORD* pdwStubPhase);
626
627 typedef struct IMallocSpy IMallocSpy;
628 typedef IMallocSpy *LPMALLOCSPY;
629
630 /*****************************************************************************
631  * IMallocSpy interface
632  */
633 DEFINE_GUID(IID_IMallocSpy, 0x0000001d, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
634 #if defined(__cplusplus) && !defined(CINTERFACE)
635 struct IMallocSpy : public IUnknown
636 {
637     virtual ULONG STDMETHODCALLTYPE PreAlloc(
638         ULONG cbRequest) = 0;
639
640     virtual LPVOID STDMETHODCALLTYPE PostAlloc(
641         LPVOID pActual) = 0;
642
643     virtual LPVOID STDMETHODCALLTYPE PreFree(
644         LPVOID pRequest,
645         BOOL fSpyed) = 0;
646
647     virtual void STDMETHODCALLTYPE PostFree(
648         BOOL fSpyed) = 0;
649
650     virtual ULONG STDMETHODCALLTYPE PreRealloc(
651         LPVOID pRequest,
652         ULONG cbRequest,
653         LPVOID* ppNewRequest,
654         BOOL fSpyed) = 0;
655
656     virtual LPVOID STDMETHODCALLTYPE PostRealloc(
657         LPVOID pActual,
658         BOOL fSpyed) = 0;
659
660     virtual LPVOID STDMETHODCALLTYPE PreGetSize(
661         LPVOID pRequest,
662         BOOL fSpyed) = 0;
663
664     virtual ULONG STDMETHODCALLTYPE PostGetSize(
665         ULONG cbActual,
666         BOOL fSpyed) = 0;
667
668     virtual LPVOID STDMETHODCALLTYPE PreDidAlloc(
669         LPVOID pRequest,
670         BOOL fSpyed) = 0;
671
672     virtual int STDMETHODCALLTYPE PostDidAlloc(
673         LPVOID pRequest,
674         BOOL fSpyed,
675         int fActual) = 0;
676
677     virtual void STDMETHODCALLTYPE PreHeapMinimize(
678         ) = 0;
679
680     virtual void STDMETHODCALLTYPE PostHeapMinimize(
681         ) = 0;
682
683 };
684 #else
685 typedef struct IMallocSpyVtbl IMallocSpyVtbl;
686 struct IMallocSpy {
687     const IMallocSpyVtbl* lpVtbl;
688 };
689 struct IMallocSpyVtbl {
690     ICOM_MSVTABLE_COMPAT_FIELDS
691
692     /*** IUnknown methods ***/
693     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
694         IMallocSpy* This,
695         REFIID riid,
696         void** ppvObject);
697
698     ULONG (STDMETHODCALLTYPE *AddRef)(
699         IMallocSpy* This);
700
701     ULONG (STDMETHODCALLTYPE *Release)(
702         IMallocSpy* This);
703
704     /*** IMallocSpy methods ***/
705     ULONG (STDMETHODCALLTYPE *PreAlloc)(
706         IMallocSpy* This,
707         ULONG cbRequest);
708
709     LPVOID (STDMETHODCALLTYPE *PostAlloc)(
710         IMallocSpy* This,
711         LPVOID pActual);
712
713     LPVOID (STDMETHODCALLTYPE *PreFree)(
714         IMallocSpy* This,
715         LPVOID pRequest,
716         BOOL fSpyed);
717
718     void (STDMETHODCALLTYPE *PostFree)(
719         IMallocSpy* This,
720         BOOL fSpyed);
721
722     ULONG (STDMETHODCALLTYPE *PreRealloc)(
723         IMallocSpy* This,
724         LPVOID pRequest,
725         ULONG cbRequest,
726         LPVOID* ppNewRequest,
727         BOOL fSpyed);
728
729     LPVOID (STDMETHODCALLTYPE *PostRealloc)(
730         IMallocSpy* This,
731         LPVOID pActual,
732         BOOL fSpyed);
733
734     LPVOID (STDMETHODCALLTYPE *PreGetSize)(
735         IMallocSpy* This,
736         LPVOID pRequest,
737         BOOL fSpyed);
738
739     ULONG (STDMETHODCALLTYPE *PostGetSize)(
740         IMallocSpy* This,
741         ULONG cbActual,
742         BOOL fSpyed);
743
744     LPVOID (STDMETHODCALLTYPE *PreDidAlloc)(
745         IMallocSpy* This,
746         LPVOID pRequest,
747         BOOL fSpyed);
748
749     int (STDMETHODCALLTYPE *PostDidAlloc)(
750         IMallocSpy* This,
751         LPVOID pRequest,
752         BOOL fSpyed,
753         int fActual);
754
755     void (STDMETHODCALLTYPE *PreHeapMinimize)(
756         IMallocSpy* This);
757
758     void (STDMETHODCALLTYPE *PostHeapMinimize)(
759         IMallocSpy* This);
760
761 };
762
763 /*** IUnknown methods ***/
764 #define IMallocSpy_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
765 #define IMallocSpy_AddRef(p) (p)->lpVtbl->AddRef(p)
766 #define IMallocSpy_Release(p) (p)->lpVtbl->Release(p)
767 /*** IMallocSpy methods ***/
768 #define IMallocSpy_PreAlloc(p,a) (p)->lpVtbl->PreAlloc(p,a)
769 #define IMallocSpy_PostAlloc(p,a) (p)->lpVtbl->PostAlloc(p,a)
770 #define IMallocSpy_PreFree(p,a,b) (p)->lpVtbl->PreFree(p,a,b)
771 #define IMallocSpy_PostFree(p,a) (p)->lpVtbl->PostFree(p,a)
772 #define IMallocSpy_PreRealloc(p,a,b,c,d) (p)->lpVtbl->PreRealloc(p,a,b,c,d)
773 #define IMallocSpy_PostRealloc(p,a,b) (p)->lpVtbl->PostRealloc(p,a,b)
774 #define IMallocSpy_PreGetSize(p,a,b) (p)->lpVtbl->PreGetSize(p,a,b)
775 #define IMallocSpy_PostGetSize(p,a,b) (p)->lpVtbl->PostGetSize(p,a,b)
776 #define IMallocSpy_PreDidAlloc(p,a,b) (p)->lpVtbl->PreDidAlloc(p,a,b)
777 #define IMallocSpy_PostDidAlloc(p,a,b,c) (p)->lpVtbl->PostDidAlloc(p,a,b,c)
778 #define IMallocSpy_PreHeapMinimize(p) (p)->lpVtbl->PreHeapMinimize(p)
779 #define IMallocSpy_PostHeapMinimize(p) (p)->lpVtbl->PostHeapMinimize(p)
780
781 #endif
782
783 #define IMallocSpy_METHODS \
784     ICOM_MSVTABLE_COMPAT_FIELDS \
785     /*** IUnknown methods ***/ \
786     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
787     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
788     STDMETHOD_(ULONG,Release)(THIS) PURE; \
789     /*** IMallocSpy methods ***/ \
790     STDMETHOD_(ULONG,PreAlloc)(THIS_ ULONG cbRequest) PURE; \
791     STDMETHOD_(LPVOID,PostAlloc)(THIS_ LPVOID pActual) PURE; \
792     STDMETHOD_(LPVOID,PreFree)(THIS_ LPVOID pRequest, BOOL fSpyed) PURE; \
793     STDMETHOD_(void,PostFree)(THIS_ BOOL fSpyed) PURE; \
794     STDMETHOD_(ULONG,PreRealloc)(THIS_ LPVOID pRequest, ULONG cbRequest, LPVOID* ppNewRequest, BOOL fSpyed) PURE; \
795     STDMETHOD_(LPVOID,PostRealloc)(THIS_ LPVOID pActual, BOOL fSpyed) PURE; \
796     STDMETHOD_(LPVOID,PreGetSize)(THIS_ LPVOID pRequest, BOOL fSpyed) PURE; \
797     STDMETHOD_(ULONG,PostGetSize)(THIS_ ULONG cbActual, BOOL fSpyed) PURE; \
798     STDMETHOD_(LPVOID,PreDidAlloc)(THIS_ LPVOID pRequest, BOOL fSpyed) PURE; \
799     STDMETHOD_(int,PostDidAlloc)(THIS_ LPVOID pRequest, BOOL fSpyed, int fActual) PURE; \
800     STDMETHOD_(void,PreHeapMinimize)(THIS) PURE; \
801     STDMETHOD_(void,PostHeapMinimize)(THIS) PURE;
802
803 ULONG CALLBACK IMallocSpy_PreAlloc_Proxy(
804     IMallocSpy* This,
805     ULONG cbRequest);
806 void __RPC_STUB IMallocSpy_PreAlloc_Stub(
807     struct IRpcStubBuffer* This,
808     struct IRpcChannelBuffer* pRpcChannelBuffer,
809     PRPC_MESSAGE pRpcMessage,
810     DWORD* pdwStubPhase);
811 LPVOID CALLBACK IMallocSpy_PostAlloc_Proxy(
812     IMallocSpy* This,
813     LPVOID pActual);
814 void __RPC_STUB IMallocSpy_PostAlloc_Stub(
815     struct IRpcStubBuffer* This,
816     struct IRpcChannelBuffer* pRpcChannelBuffer,
817     PRPC_MESSAGE pRpcMessage,
818     DWORD* pdwStubPhase);
819 LPVOID CALLBACK IMallocSpy_PreFree_Proxy(
820     IMallocSpy* This,
821     LPVOID pRequest,
822     BOOL fSpyed);
823 void __RPC_STUB IMallocSpy_PreFree_Stub(
824     struct IRpcStubBuffer* This,
825     struct IRpcChannelBuffer* pRpcChannelBuffer,
826     PRPC_MESSAGE pRpcMessage,
827     DWORD* pdwStubPhase);
828 void CALLBACK IMallocSpy_PostFree_Proxy(
829     IMallocSpy* This,
830     BOOL fSpyed);
831 void __RPC_STUB IMallocSpy_PostFree_Stub(
832     struct IRpcStubBuffer* This,
833     struct IRpcChannelBuffer* pRpcChannelBuffer,
834     PRPC_MESSAGE pRpcMessage,
835     DWORD* pdwStubPhase);
836 ULONG CALLBACK IMallocSpy_PreRealloc_Proxy(
837     IMallocSpy* This,
838     LPVOID pRequest,
839     ULONG cbRequest,
840     LPVOID* ppNewRequest,
841     BOOL fSpyed);
842 void __RPC_STUB IMallocSpy_PreRealloc_Stub(
843     struct IRpcStubBuffer* This,
844     struct IRpcChannelBuffer* pRpcChannelBuffer,
845     PRPC_MESSAGE pRpcMessage,
846     DWORD* pdwStubPhase);
847 LPVOID CALLBACK IMallocSpy_PostRealloc_Proxy(
848     IMallocSpy* This,
849     LPVOID pActual,
850     BOOL fSpyed);
851 void __RPC_STUB IMallocSpy_PostRealloc_Stub(
852     struct IRpcStubBuffer* This,
853     struct IRpcChannelBuffer* pRpcChannelBuffer,
854     PRPC_MESSAGE pRpcMessage,
855     DWORD* pdwStubPhase);
856 LPVOID CALLBACK IMallocSpy_PreGetSize_Proxy(
857     IMallocSpy* This,
858     LPVOID pRequest,
859     BOOL fSpyed);
860 void __RPC_STUB IMallocSpy_PreGetSize_Stub(
861     struct IRpcStubBuffer* This,
862     struct IRpcChannelBuffer* pRpcChannelBuffer,
863     PRPC_MESSAGE pRpcMessage,
864     DWORD* pdwStubPhase);
865 ULONG CALLBACK IMallocSpy_PostGetSize_Proxy(
866     IMallocSpy* This,
867     ULONG cbActual,
868     BOOL fSpyed);
869 void __RPC_STUB IMallocSpy_PostGetSize_Stub(
870     struct IRpcStubBuffer* This,
871     struct IRpcChannelBuffer* pRpcChannelBuffer,
872     PRPC_MESSAGE pRpcMessage,
873     DWORD* pdwStubPhase);
874 LPVOID CALLBACK IMallocSpy_PreDidAlloc_Proxy(
875     IMallocSpy* This,
876     LPVOID pRequest,
877     BOOL fSpyed);
878 void __RPC_STUB IMallocSpy_PreDidAlloc_Stub(
879     struct IRpcStubBuffer* This,
880     struct IRpcChannelBuffer* pRpcChannelBuffer,
881     PRPC_MESSAGE pRpcMessage,
882     DWORD* pdwStubPhase);
883 int CALLBACK IMallocSpy_PostDidAlloc_Proxy(
884     IMallocSpy* This,
885     LPVOID pRequest,
886     BOOL fSpyed,
887     int fActual);
888 void __RPC_STUB IMallocSpy_PostDidAlloc_Stub(
889     struct IRpcStubBuffer* This,
890     struct IRpcChannelBuffer* pRpcChannelBuffer,
891     PRPC_MESSAGE pRpcMessage,
892     DWORD* pdwStubPhase);
893 void CALLBACK IMallocSpy_PreHeapMinimize_Proxy(
894     IMallocSpy* This);
895 void __RPC_STUB IMallocSpy_PreHeapMinimize_Stub(
896     struct IRpcStubBuffer* This,
897     struct IRpcChannelBuffer* pRpcChannelBuffer,
898     PRPC_MESSAGE pRpcMessage,
899     DWORD* pdwStubPhase);
900 void CALLBACK IMallocSpy_PostHeapMinimize_Proxy(
901     IMallocSpy* This);
902 void __RPC_STUB IMallocSpy_PostHeapMinimize_Stub(
903     struct IRpcStubBuffer* This,
904     struct IRpcChannelBuffer* pRpcChannelBuffer,
905     PRPC_MESSAGE pRpcMessage,
906     DWORD* pdwStubPhase);
907
908 typedef struct IEnumUnknown IEnumUnknown;
909 typedef IEnumUnknown *LPENUMUNKNOWN;
910
911 /*****************************************************************************
912  * IEnumUnknown interface
913  */
914 DEFINE_GUID(IID_IEnumUnknown, 0x00000100, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
915 #if defined(__cplusplus) && !defined(CINTERFACE)
916 struct IEnumUnknown : public IUnknown
917 {
918     virtual HRESULT STDMETHODCALLTYPE Next(
919         ULONG celt,
920         IUnknown** rgelt,
921         ULONG* pceltFetched) = 0;
922
923     virtual HRESULT STDMETHODCALLTYPE Skip(
924         ULONG celt) = 0;
925
926     virtual HRESULT STDMETHODCALLTYPE Reset(
927         ) = 0;
928
929     virtual HRESULT STDMETHODCALLTYPE Clone(
930         IEnumUnknown** ppenum) = 0;
931
932 };
933 #else
934 typedef struct IEnumUnknownVtbl IEnumUnknownVtbl;
935 struct IEnumUnknown {
936     const IEnumUnknownVtbl* lpVtbl;
937 };
938 struct IEnumUnknownVtbl {
939     ICOM_MSVTABLE_COMPAT_FIELDS
940
941     /*** IUnknown methods ***/
942     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
943         IEnumUnknown* This,
944         REFIID riid,
945         void** ppvObject);
946
947     ULONG (STDMETHODCALLTYPE *AddRef)(
948         IEnumUnknown* This);
949
950     ULONG (STDMETHODCALLTYPE *Release)(
951         IEnumUnknown* This);
952
953     /*** IEnumUnknown methods ***/
954     HRESULT (STDMETHODCALLTYPE *Next)(
955         IEnumUnknown* This,
956         ULONG celt,
957         IUnknown** rgelt,
958         ULONG* pceltFetched);
959
960     HRESULT (STDMETHODCALLTYPE *Skip)(
961         IEnumUnknown* This,
962         ULONG celt);
963
964     HRESULT (STDMETHODCALLTYPE *Reset)(
965         IEnumUnknown* This);
966
967     HRESULT (STDMETHODCALLTYPE *Clone)(
968         IEnumUnknown* This,
969         IEnumUnknown** ppenum);
970
971 };
972
973 /*** IUnknown methods ***/
974 #define IEnumUnknown_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
975 #define IEnumUnknown_AddRef(p) (p)->lpVtbl->AddRef(p)
976 #define IEnumUnknown_Release(p) (p)->lpVtbl->Release(p)
977 /*** IEnumUnknown methods ***/
978 #define IEnumUnknown_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
979 #define IEnumUnknown_Skip(p,a) (p)->lpVtbl->Skip(p,a)
980 #define IEnumUnknown_Reset(p) (p)->lpVtbl->Reset(p)
981 #define IEnumUnknown_Clone(p,a) (p)->lpVtbl->Clone(p,a)
982
983 #endif
984
985 #define IEnumUnknown_METHODS \
986     ICOM_MSVTABLE_COMPAT_FIELDS \
987     /*** IUnknown methods ***/ \
988     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
989     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
990     STDMETHOD_(ULONG,Release)(THIS) PURE; \
991     /*** IEnumUnknown methods ***/ \
992     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, IUnknown** rgelt, ULONG* pceltFetched) PURE; \
993     STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
994     STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
995     STDMETHOD_(HRESULT,Clone)(THIS_ IEnumUnknown** ppenum) PURE;
996
997 HRESULT CALLBACK IEnumUnknown_RemoteNext_Proxy(
998     IEnumUnknown* This,
999     ULONG celt,
1000     IUnknown** rgelt,
1001     ULONG* pceltFetched);
1002 void __RPC_STUB IEnumUnknown_RemoteNext_Stub(
1003     struct IRpcStubBuffer* This,
1004     struct IRpcChannelBuffer* pRpcChannelBuffer,
1005     PRPC_MESSAGE pRpcMessage,
1006     DWORD* pdwStubPhase);
1007 HRESULT CALLBACK IEnumUnknown_Next_Proxy(
1008     IEnumUnknown* This,
1009     ULONG celt,
1010     IUnknown** rgelt,
1011     ULONG* pceltFetched);
1012 HRESULT __RPC_STUB IEnumUnknown_Next_Stub(
1013     IEnumUnknown* This,
1014     ULONG celt,
1015     IUnknown** rgelt,
1016     ULONG* pceltFetched);
1017 HRESULT CALLBACK IEnumUnknown_Skip_Proxy(
1018     IEnumUnknown* This,
1019     ULONG celt);
1020 void __RPC_STUB IEnumUnknown_Skip_Stub(
1021     struct IRpcStubBuffer* This,
1022     struct IRpcChannelBuffer* pRpcChannelBuffer,
1023     PRPC_MESSAGE pRpcMessage,
1024     DWORD* pdwStubPhase);
1025 HRESULT CALLBACK IEnumUnknown_Reset_Proxy(
1026     IEnumUnknown* This);
1027 void __RPC_STUB IEnumUnknown_Reset_Stub(
1028     struct IRpcStubBuffer* This,
1029     struct IRpcChannelBuffer* pRpcChannelBuffer,
1030     PRPC_MESSAGE pRpcMessage,
1031     DWORD* pdwStubPhase);
1032 HRESULT CALLBACK IEnumUnknown_Clone_Proxy(
1033     IEnumUnknown* This,
1034     IEnumUnknown** ppenum);
1035 void __RPC_STUB IEnumUnknown_Clone_Stub(
1036     struct IRpcStubBuffer* This,
1037     struct IRpcChannelBuffer* pRpcChannelBuffer,
1038     PRPC_MESSAGE pRpcMessage,
1039     DWORD* pdwStubPhase);
1040
1041 typedef struct ISurrogate ISurrogate;
1042 typedef ISurrogate *LPSURROGATE;
1043
1044 /*****************************************************************************
1045  * ISurrogate interface
1046  */
1047 DEFINE_GUID(IID_ISurrogate, 0x00000022, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
1048 #if defined(__cplusplus) && !defined(CINTERFACE)
1049 struct ISurrogate : public IUnknown
1050 {
1051     virtual HRESULT STDMETHODCALLTYPE LoadDllServer(
1052         REFCLSID Clsid) = 0;
1053
1054     virtual HRESULT STDMETHODCALLTYPE FreeSurrogate(
1055         ) = 0;
1056
1057 };
1058 #else
1059 typedef struct ISurrogateVtbl ISurrogateVtbl;
1060 struct ISurrogate {
1061     const ISurrogateVtbl* lpVtbl;
1062 };
1063 struct ISurrogateVtbl {
1064     ICOM_MSVTABLE_COMPAT_FIELDS
1065
1066     /*** IUnknown methods ***/
1067     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
1068         ISurrogate* This,
1069         REFIID riid,
1070         void** ppvObject);
1071
1072     ULONG (STDMETHODCALLTYPE *AddRef)(
1073         ISurrogate* This);
1074
1075     ULONG (STDMETHODCALLTYPE *Release)(
1076         ISurrogate* This);
1077
1078     /*** ISurrogate methods ***/
1079     HRESULT (STDMETHODCALLTYPE *LoadDllServer)(
1080         ISurrogate* This,
1081         REFCLSID Clsid);
1082
1083     HRESULT (STDMETHODCALLTYPE *FreeSurrogate)(
1084         ISurrogate* This);
1085
1086 };
1087
1088 /*** IUnknown methods ***/
1089 #define ISurrogate_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1090 #define ISurrogate_AddRef(p) (p)->lpVtbl->AddRef(p)
1091 #define ISurrogate_Release(p) (p)->lpVtbl->Release(p)
1092 /*** ISurrogate methods ***/
1093 #define ISurrogate_LoadDllServer(p,a) (p)->lpVtbl->LoadDllServer(p,a)
1094 #define ISurrogate_FreeSurrogate(p) (p)->lpVtbl->FreeSurrogate(p)
1095
1096 #endif
1097
1098 #define ISurrogate_METHODS \
1099     ICOM_MSVTABLE_COMPAT_FIELDS \
1100     /*** IUnknown methods ***/ \
1101     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
1102     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
1103     STDMETHOD_(ULONG,Release)(THIS) PURE; \
1104     /*** ISurrogate methods ***/ \
1105     STDMETHOD_(HRESULT,LoadDllServer)(THIS_ REFCLSID Clsid) PURE; \
1106     STDMETHOD_(HRESULT,FreeSurrogate)(THIS) PURE;
1107
1108 HRESULT CALLBACK ISurrogate_LoadDllServer_Proxy(
1109     ISurrogate* This,
1110     REFCLSID Clsid);
1111 void __RPC_STUB ISurrogate_LoadDllServer_Stub(
1112     struct IRpcStubBuffer* This,
1113     struct IRpcChannelBuffer* pRpcChannelBuffer,
1114     PRPC_MESSAGE pRpcMessage,
1115     DWORD* pdwStubPhase);
1116 HRESULT CALLBACK ISurrogate_FreeSurrogate_Proxy(
1117     ISurrogate* This);
1118 void __RPC_STUB ISurrogate_FreeSurrogate_Stub(
1119     struct IRpcStubBuffer* This,
1120     struct IRpcChannelBuffer* pRpcChannelBuffer,
1121     PRPC_MESSAGE pRpcMessage,
1122     DWORD* pdwStubPhase);
1123
1124 typedef struct IGlobalInterfaceTable IGlobalInterfaceTable;
1125 typedef IGlobalInterfaceTable *LPGLOBALINTERFACETABLE;
1126
1127 /*****************************************************************************
1128  * IGlobalInterfaceTable interface
1129  */
1130 DEFINE_GUID(IID_IGlobalInterfaceTable, 0x00000146, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
1131 #if defined(__cplusplus) && !defined(CINTERFACE)
1132 struct IGlobalInterfaceTable : public IUnknown
1133 {
1134     virtual HRESULT STDMETHODCALLTYPE RegisterInterfaceInGlobal(
1135         IUnknown* pUnk,
1136         REFIID riid,
1137         DWORD* pdwCookie) = 0;
1138
1139     virtual HRESULT STDMETHODCALLTYPE RevokeInterfaceFromGlobal(
1140         DWORD dwCookie) = 0;
1141
1142     virtual HRESULT STDMETHODCALLTYPE GetInterfaceFromGlobal(
1143         DWORD dwCookie,
1144         REFIID riid,
1145         void** ppv) = 0;
1146
1147 };
1148 #else
1149 typedef struct IGlobalInterfaceTableVtbl IGlobalInterfaceTableVtbl;
1150 struct IGlobalInterfaceTable {
1151     const IGlobalInterfaceTableVtbl* lpVtbl;
1152 };
1153 struct IGlobalInterfaceTableVtbl {
1154     ICOM_MSVTABLE_COMPAT_FIELDS
1155
1156     /*** IUnknown methods ***/
1157     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
1158         IGlobalInterfaceTable* This,
1159         REFIID riid,
1160         void** ppvObject);
1161
1162     ULONG (STDMETHODCALLTYPE *AddRef)(
1163         IGlobalInterfaceTable* This);
1164
1165     ULONG (STDMETHODCALLTYPE *Release)(
1166         IGlobalInterfaceTable* This);
1167
1168     /*** IGlobalInterfaceTable methods ***/
1169     HRESULT (STDMETHODCALLTYPE *RegisterInterfaceInGlobal)(
1170         IGlobalInterfaceTable* This,
1171         IUnknown* pUnk,
1172         REFIID riid,
1173         DWORD* pdwCookie);
1174
1175     HRESULT (STDMETHODCALLTYPE *RevokeInterfaceFromGlobal)(
1176         IGlobalInterfaceTable* This,
1177         DWORD dwCookie);
1178
1179     HRESULT (STDMETHODCALLTYPE *GetInterfaceFromGlobal)(
1180         IGlobalInterfaceTable* This,
1181         DWORD dwCookie,
1182         REFIID riid,
1183         void** ppv);
1184
1185 };
1186
1187 /*** IUnknown methods ***/
1188 #define IGlobalInterfaceTable_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1189 #define IGlobalInterfaceTable_AddRef(p) (p)->lpVtbl->AddRef(p)
1190 #define IGlobalInterfaceTable_Release(p) (p)->lpVtbl->Release(p)
1191 /*** IGlobalInterfaceTable methods ***/
1192 #define IGlobalInterfaceTable_RegisterInterfaceInGlobal(p,a,b,c) (p)->lpVtbl->RegisterInterfaceInGlobal(p,a,b,c)
1193 #define IGlobalInterfaceTable_RevokeInterfaceFromGlobal(p,a) (p)->lpVtbl->RevokeInterfaceFromGlobal(p,a)
1194 #define IGlobalInterfaceTable_GetInterfaceFromGlobal(p,a,b,c) (p)->lpVtbl->GetInterfaceFromGlobal(p,a,b,c)
1195
1196 #endif
1197
1198 #define IGlobalInterfaceTable_METHODS \
1199     ICOM_MSVTABLE_COMPAT_FIELDS \
1200     /*** IUnknown methods ***/ \
1201     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
1202     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
1203     STDMETHOD_(ULONG,Release)(THIS) PURE; \
1204     /*** IGlobalInterfaceTable methods ***/ \
1205     STDMETHOD_(HRESULT,RegisterInterfaceInGlobal)(THIS_ IUnknown* pUnk, REFIID riid, DWORD* pdwCookie) PURE; \
1206     STDMETHOD_(HRESULT,RevokeInterfaceFromGlobal)(THIS_ DWORD dwCookie) PURE; \
1207     STDMETHOD_(HRESULT,GetInterfaceFromGlobal)(THIS_ DWORD dwCookie, REFIID riid, void** ppv) PURE;
1208
1209 HRESULT CALLBACK IGlobalInterfaceTable_RegisterInterfaceInGlobal_Proxy(
1210     IGlobalInterfaceTable* This,
1211     IUnknown* pUnk,
1212     REFIID riid,
1213     DWORD* pdwCookie);
1214 void __RPC_STUB IGlobalInterfaceTable_RegisterInterfaceInGlobal_Stub(
1215     struct IRpcStubBuffer* This,
1216     struct IRpcChannelBuffer* pRpcChannelBuffer,
1217     PRPC_MESSAGE pRpcMessage,
1218     DWORD* pdwStubPhase);
1219 HRESULT CALLBACK IGlobalInterfaceTable_RevokeInterfaceFromGlobal_Proxy(
1220     IGlobalInterfaceTable* This,
1221     DWORD dwCookie);
1222 void __RPC_STUB IGlobalInterfaceTable_RevokeInterfaceFromGlobal_Stub(
1223     struct IRpcStubBuffer* This,
1224     struct IRpcChannelBuffer* pRpcChannelBuffer,
1225     PRPC_MESSAGE pRpcMessage,
1226     DWORD* pdwStubPhase);
1227 HRESULT CALLBACK IGlobalInterfaceTable_GetInterfaceFromGlobal_Proxy(
1228     IGlobalInterfaceTable* This,
1229     DWORD dwCookie,
1230     REFIID riid,
1231     void** ppv);
1232 void __RPC_STUB IGlobalInterfaceTable_GetInterfaceFromGlobal_Stub(
1233     struct IRpcStubBuffer* This,
1234     struct IRpcChannelBuffer* pRpcChannelBuffer,
1235     PRPC_MESSAGE pRpcMessage,
1236     DWORD* pdwStubPhase);
1237
1238 typedef struct IBindCtx IBindCtx;
1239 typedef IBindCtx *LPBINDCTX;
1240
1241 typedef IBindCtx *LPBC;
1242
1243 typedef struct tagBIND_OPTS {
1244     DWORD cbStruct;
1245     DWORD grfFlags;
1246     DWORD grfMode;
1247     DWORD dwTickCountDeadline;
1248 } BIND_OPTS, *LPBIND_OPTS;
1249
1250 typedef struct tagBIND_OPTS2 {
1251     DWORD cbStruct;
1252     DWORD grfFlags;
1253     DWORD grfMode;
1254     DWORD dwTickCountDeadline;
1255     DWORD dwTrackFlags;
1256     DWORD dwClassContext;
1257     LCID locale;
1258     COSERVERINFO *pServerInfo;
1259 } BIND_OPTS2, *LPBIND_OPTS2;
1260
1261 typedef enum tagBIND_FLAGS {
1262     BIND_MAYBOTHERUSER = 1,
1263     BIND_JUSTTESTEXISTENCE = 2
1264 } BIND_FLAGS;
1265
1266 /*****************************************************************************
1267  * IBindCtx interface
1268  */
1269 DEFINE_GUID(IID_IBindCtx, 0x0000000e, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
1270 #if defined(__cplusplus) && !defined(CINTERFACE)
1271 struct IBindCtx : public IUnknown
1272 {
1273     virtual HRESULT STDMETHODCALLTYPE RegisterObjectBound(
1274         IUnknown* punk) = 0;
1275
1276     virtual HRESULT STDMETHODCALLTYPE RevokeObjectBound(
1277         IUnknown* punk) = 0;
1278
1279     virtual HRESULT STDMETHODCALLTYPE ReleaseBoundObjects(
1280         ) = 0;
1281
1282     virtual HRESULT STDMETHODCALLTYPE SetBindOptions(
1283         BIND_OPTS* pbindopts) = 0;
1284
1285     virtual HRESULT STDMETHODCALLTYPE GetBindOptions(
1286         BIND_OPTS* pbindopts) = 0;
1287
1288     virtual HRESULT STDMETHODCALLTYPE GetRunningObjectTable(
1289         IRunningObjectTable** pprot) = 0;
1290
1291     virtual HRESULT STDMETHODCALLTYPE RegisterObjectParam(
1292         LPOLESTR pszKey,
1293         IUnknown* punk) = 0;
1294
1295     virtual HRESULT STDMETHODCALLTYPE GetObjectParam(
1296         LPOLESTR pszKey,
1297         IUnknown** ppunk) = 0;
1298
1299     virtual HRESULT STDMETHODCALLTYPE EnumObjectParam(
1300         IEnumString** ppenum) = 0;
1301
1302     virtual HRESULT STDMETHODCALLTYPE RevokeObjectParam(
1303         LPOLESTR pszKey) = 0;
1304
1305 };
1306 #else
1307 typedef struct IBindCtxVtbl IBindCtxVtbl;
1308 struct IBindCtx {
1309     const IBindCtxVtbl* lpVtbl;
1310 };
1311 struct IBindCtxVtbl {
1312     ICOM_MSVTABLE_COMPAT_FIELDS
1313
1314     /*** IUnknown methods ***/
1315     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
1316         IBindCtx* This,
1317         REFIID riid,
1318         void** ppvObject);
1319
1320     ULONG (STDMETHODCALLTYPE *AddRef)(
1321         IBindCtx* This);
1322
1323     ULONG (STDMETHODCALLTYPE *Release)(
1324         IBindCtx* This);
1325
1326     /*** IBindCtx methods ***/
1327     HRESULT (STDMETHODCALLTYPE *RegisterObjectBound)(
1328         IBindCtx* This,
1329         IUnknown* punk);
1330
1331     HRESULT (STDMETHODCALLTYPE *RevokeObjectBound)(
1332         IBindCtx* This,
1333         IUnknown* punk);
1334
1335     HRESULT (STDMETHODCALLTYPE *ReleaseBoundObjects)(
1336         IBindCtx* This);
1337
1338     HRESULT (STDMETHODCALLTYPE *SetBindOptions)(
1339         IBindCtx* This,
1340         BIND_OPTS* pbindopts);
1341
1342     HRESULT (STDMETHODCALLTYPE *GetBindOptions)(
1343         IBindCtx* This,
1344         BIND_OPTS* pbindopts);
1345
1346     HRESULT (STDMETHODCALLTYPE *GetRunningObjectTable)(
1347         IBindCtx* This,
1348         IRunningObjectTable** pprot);
1349
1350     HRESULT (STDMETHODCALLTYPE *RegisterObjectParam)(
1351         IBindCtx* This,
1352         LPOLESTR pszKey,
1353         IUnknown* punk);
1354
1355     HRESULT (STDMETHODCALLTYPE *GetObjectParam)(
1356         IBindCtx* This,
1357         LPOLESTR pszKey,
1358         IUnknown** ppunk);
1359
1360     HRESULT (STDMETHODCALLTYPE *EnumObjectParam)(
1361         IBindCtx* This,
1362         IEnumString** ppenum);
1363
1364     HRESULT (STDMETHODCALLTYPE *RevokeObjectParam)(
1365         IBindCtx* This,
1366         LPOLESTR pszKey);
1367
1368 };
1369
1370 /*** IUnknown methods ***/
1371 #define IBindCtx_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1372 #define IBindCtx_AddRef(p) (p)->lpVtbl->AddRef(p)
1373 #define IBindCtx_Release(p) (p)->lpVtbl->Release(p)
1374 /*** IBindCtx methods ***/
1375 #define IBindCtx_RegisterObjectBound(p,a) (p)->lpVtbl->RegisterObjectBound(p,a)
1376 #define IBindCtx_RevokeObjectBound(p,a) (p)->lpVtbl->RevokeObjectBound(p,a)
1377 #define IBindCtx_ReleaseBoundObjects(p) (p)->lpVtbl->ReleaseBoundObjects(p)
1378 #define IBindCtx_SetBindOptions(p,a) (p)->lpVtbl->SetBindOptions(p,a)
1379 #define IBindCtx_GetBindOptions(p,a) (p)->lpVtbl->GetBindOptions(p,a)
1380 #define IBindCtx_GetRunningObjectTable(p,a) (p)->lpVtbl->GetRunningObjectTable(p,a)
1381 #define IBindCtx_RegisterObjectParam(p,a,b) (p)->lpVtbl->RegisterObjectParam(p,a,b)
1382 #define IBindCtx_GetObjectParam(p,a,b) (p)->lpVtbl->GetObjectParam(p,a,b)
1383 #define IBindCtx_EnumObjectParam(p,a) (p)->lpVtbl->EnumObjectParam(p,a)
1384 #define IBindCtx_RevokeObjectParam(p,a) (p)->lpVtbl->RevokeObjectParam(p,a)
1385
1386 #endif
1387
1388 #define IBindCtx_METHODS \
1389     ICOM_MSVTABLE_COMPAT_FIELDS \
1390     /*** IUnknown methods ***/ \
1391     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
1392     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
1393     STDMETHOD_(ULONG,Release)(THIS) PURE; \
1394     /*** IBindCtx methods ***/ \
1395     STDMETHOD_(HRESULT,RegisterObjectBound)(THIS_ IUnknown* punk) PURE; \
1396     STDMETHOD_(HRESULT,RevokeObjectBound)(THIS_ IUnknown* punk) PURE; \
1397     STDMETHOD_(HRESULT,ReleaseBoundObjects)(THIS) PURE; \
1398     STDMETHOD_(HRESULT,SetBindOptions)(THIS_ BIND_OPTS* pbindopts) PURE; \
1399     STDMETHOD_(HRESULT,GetBindOptions)(THIS_ BIND_OPTS* pbindopts) PURE; \
1400     STDMETHOD_(HRESULT,GetRunningObjectTable)(THIS_ IRunningObjectTable** pprot) PURE; \
1401     STDMETHOD_(HRESULT,RegisterObjectParam)(THIS_ LPOLESTR pszKey, IUnknown* punk) PURE; \
1402     STDMETHOD_(HRESULT,GetObjectParam)(THIS_ LPOLESTR pszKey, IUnknown** ppunk) PURE; \
1403     STDMETHOD_(HRESULT,EnumObjectParam)(THIS_ IEnumString** ppenum) PURE; \
1404     STDMETHOD_(HRESULT,RevokeObjectParam)(THIS_ LPOLESTR pszKey) PURE;
1405
1406 HRESULT CALLBACK IBindCtx_RegisterObjectBound_Proxy(
1407     IBindCtx* This,
1408     IUnknown* punk);
1409 void __RPC_STUB IBindCtx_RegisterObjectBound_Stub(
1410     struct IRpcStubBuffer* This,
1411     struct IRpcChannelBuffer* pRpcChannelBuffer,
1412     PRPC_MESSAGE pRpcMessage,
1413     DWORD* pdwStubPhase);
1414 HRESULT CALLBACK IBindCtx_RevokeObjectBound_Proxy(
1415     IBindCtx* This,
1416     IUnknown* punk);
1417 void __RPC_STUB IBindCtx_RevokeObjectBound_Stub(
1418     struct IRpcStubBuffer* This,
1419     struct IRpcChannelBuffer* pRpcChannelBuffer,
1420     PRPC_MESSAGE pRpcMessage,
1421     DWORD* pdwStubPhase);
1422 HRESULT CALLBACK IBindCtx_ReleaseBoundObjects_Proxy(
1423     IBindCtx* This);
1424 void __RPC_STUB IBindCtx_ReleaseBoundObjects_Stub(
1425     struct IRpcStubBuffer* This,
1426     struct IRpcChannelBuffer* pRpcChannelBuffer,
1427     PRPC_MESSAGE pRpcMessage,
1428     DWORD* pdwStubPhase);
1429 HRESULT CALLBACK IBindCtx_RemoteSetBindOptions_Proxy(
1430     IBindCtx* This,
1431     BIND_OPTS2* pbindopts);
1432 void __RPC_STUB IBindCtx_RemoteSetBindOptions_Stub(
1433     struct IRpcStubBuffer* This,
1434     struct IRpcChannelBuffer* pRpcChannelBuffer,
1435     PRPC_MESSAGE pRpcMessage,
1436     DWORD* pdwStubPhase);
1437 HRESULT CALLBACK IBindCtx_SetBindOptions_Proxy(
1438     IBindCtx* This,
1439     BIND_OPTS* pbindopts);
1440 HRESULT __RPC_STUB IBindCtx_SetBindOptions_Stub(
1441     IBindCtx* This,
1442     BIND_OPTS2* pbindopts);
1443 HRESULT CALLBACK IBindCtx_RemoteGetBindOptions_Proxy(
1444     IBindCtx* This,
1445     BIND_OPTS2* pbindopts);
1446 void __RPC_STUB IBindCtx_RemoteGetBindOptions_Stub(
1447     struct IRpcStubBuffer* This,
1448     struct IRpcChannelBuffer* pRpcChannelBuffer,
1449     PRPC_MESSAGE pRpcMessage,
1450     DWORD* pdwStubPhase);
1451 HRESULT CALLBACK IBindCtx_GetBindOptions_Proxy(
1452     IBindCtx* This,
1453     BIND_OPTS* pbindopts);
1454 HRESULT __RPC_STUB IBindCtx_GetBindOptions_Stub(
1455     IBindCtx* This,
1456     BIND_OPTS2* pbindopts);
1457 HRESULT CALLBACK IBindCtx_GetRunningObjectTable_Proxy(
1458     IBindCtx* This,
1459     IRunningObjectTable** pprot);
1460 void __RPC_STUB IBindCtx_GetRunningObjectTable_Stub(
1461     struct IRpcStubBuffer* This,
1462     struct IRpcChannelBuffer* pRpcChannelBuffer,
1463     PRPC_MESSAGE pRpcMessage,
1464     DWORD* pdwStubPhase);
1465 HRESULT CALLBACK IBindCtx_RegisterObjectParam_Proxy(
1466     IBindCtx* This,
1467     LPOLESTR pszKey,
1468     IUnknown* punk);
1469 void __RPC_STUB IBindCtx_RegisterObjectParam_Stub(
1470     struct IRpcStubBuffer* This,
1471     struct IRpcChannelBuffer* pRpcChannelBuffer,
1472     PRPC_MESSAGE pRpcMessage,
1473     DWORD* pdwStubPhase);
1474 HRESULT CALLBACK IBindCtx_GetObjectParam_Proxy(
1475     IBindCtx* This,
1476     LPOLESTR pszKey,
1477     IUnknown** ppunk);
1478 void __RPC_STUB IBindCtx_GetObjectParam_Stub(
1479     struct IRpcStubBuffer* This,
1480     struct IRpcChannelBuffer* pRpcChannelBuffer,
1481     PRPC_MESSAGE pRpcMessage,
1482     DWORD* pdwStubPhase);
1483 HRESULT CALLBACK IBindCtx_EnumObjectParam_Proxy(
1484     IBindCtx* This,
1485     IEnumString** ppenum);
1486 void __RPC_STUB IBindCtx_EnumObjectParam_Stub(
1487     struct IRpcStubBuffer* This,
1488     struct IRpcChannelBuffer* pRpcChannelBuffer,
1489     PRPC_MESSAGE pRpcMessage,
1490     DWORD* pdwStubPhase);
1491 HRESULT CALLBACK IBindCtx_RevokeObjectParam_Proxy(
1492     IBindCtx* This,
1493     LPOLESTR pszKey);
1494 void __RPC_STUB IBindCtx_RevokeObjectParam_Stub(
1495     struct IRpcStubBuffer* This,
1496     struct IRpcChannelBuffer* pRpcChannelBuffer,
1497     PRPC_MESSAGE pRpcMessage,
1498     DWORD* pdwStubPhase);
1499
1500 typedef struct IEnumMoniker IEnumMoniker;
1501 typedef IEnumMoniker *LPENUMMONIKER;
1502
1503 /*****************************************************************************
1504  * IEnumMoniker interface
1505  */
1506 DEFINE_GUID(IID_IEnumMoniker, 0x00000102, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
1507 #if defined(__cplusplus) && !defined(CINTERFACE)
1508 struct IEnumMoniker : public IUnknown
1509 {
1510     virtual HRESULT STDMETHODCALLTYPE Next(
1511         ULONG celt,
1512         IMoniker** rgelt,
1513         ULONG* pceltFetched) = 0;
1514
1515     virtual HRESULT STDMETHODCALLTYPE Skip(
1516         ULONG celt) = 0;
1517
1518     virtual HRESULT STDMETHODCALLTYPE Reset(
1519         ) = 0;
1520
1521     virtual HRESULT STDMETHODCALLTYPE Clone(
1522         IEnumMoniker** ppenum) = 0;
1523
1524 };
1525 #else
1526 typedef struct IEnumMonikerVtbl IEnumMonikerVtbl;
1527 struct IEnumMoniker {
1528     const IEnumMonikerVtbl* lpVtbl;
1529 };
1530 struct IEnumMonikerVtbl {
1531     ICOM_MSVTABLE_COMPAT_FIELDS
1532
1533     /*** IUnknown methods ***/
1534     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
1535         IEnumMoniker* This,
1536         REFIID riid,
1537         void** ppvObject);
1538
1539     ULONG (STDMETHODCALLTYPE *AddRef)(
1540         IEnumMoniker* This);
1541
1542     ULONG (STDMETHODCALLTYPE *Release)(
1543         IEnumMoniker* This);
1544
1545     /*** IEnumMoniker methods ***/
1546     HRESULT (STDMETHODCALLTYPE *Next)(
1547         IEnumMoniker* This,
1548         ULONG celt,
1549         IMoniker** rgelt,
1550         ULONG* pceltFetched);
1551
1552     HRESULT (STDMETHODCALLTYPE *Skip)(
1553         IEnumMoniker* This,
1554         ULONG celt);
1555
1556     HRESULT (STDMETHODCALLTYPE *Reset)(
1557         IEnumMoniker* This);
1558
1559     HRESULT (STDMETHODCALLTYPE *Clone)(
1560         IEnumMoniker* This,
1561         IEnumMoniker** ppenum);
1562
1563 };
1564
1565 /*** IUnknown methods ***/
1566 #define IEnumMoniker_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1567 #define IEnumMoniker_AddRef(p) (p)->lpVtbl->AddRef(p)
1568 #define IEnumMoniker_Release(p) (p)->lpVtbl->Release(p)
1569 /*** IEnumMoniker methods ***/
1570 #define IEnumMoniker_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
1571 #define IEnumMoniker_Skip(p,a) (p)->lpVtbl->Skip(p,a)
1572 #define IEnumMoniker_Reset(p) (p)->lpVtbl->Reset(p)
1573 #define IEnumMoniker_Clone(p,a) (p)->lpVtbl->Clone(p,a)
1574
1575 #endif
1576
1577 #define IEnumMoniker_METHODS \
1578     ICOM_MSVTABLE_COMPAT_FIELDS \
1579     /*** IUnknown methods ***/ \
1580     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
1581     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
1582     STDMETHOD_(ULONG,Release)(THIS) PURE; \
1583     /*** IEnumMoniker methods ***/ \
1584     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, IMoniker** rgelt, ULONG* pceltFetched) PURE; \
1585     STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
1586     STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
1587     STDMETHOD_(HRESULT,Clone)(THIS_ IEnumMoniker** ppenum) PURE;
1588
1589 HRESULT CALLBACK IEnumMoniker_RemoteNext_Proxy(
1590     IEnumMoniker* This,
1591     ULONG celt,
1592     IMoniker** rgelt,
1593     ULONG* pceltFetched);
1594 void __RPC_STUB IEnumMoniker_RemoteNext_Stub(
1595     struct IRpcStubBuffer* This,
1596     struct IRpcChannelBuffer* pRpcChannelBuffer,
1597     PRPC_MESSAGE pRpcMessage,
1598     DWORD* pdwStubPhase);
1599 HRESULT CALLBACK IEnumMoniker_Next_Proxy(
1600     IEnumMoniker* This,
1601     ULONG celt,
1602     IMoniker** rgelt,
1603     ULONG* pceltFetched);
1604 HRESULT __RPC_STUB IEnumMoniker_Next_Stub(
1605     IEnumMoniker* This,
1606     ULONG celt,
1607     IMoniker** rgelt,
1608     ULONG* pceltFetched);
1609 HRESULT CALLBACK IEnumMoniker_Skip_Proxy(
1610     IEnumMoniker* This,
1611     ULONG celt);
1612 void __RPC_STUB IEnumMoniker_Skip_Stub(
1613     struct IRpcStubBuffer* This,
1614     struct IRpcChannelBuffer* pRpcChannelBuffer,
1615     PRPC_MESSAGE pRpcMessage,
1616     DWORD* pdwStubPhase);
1617 HRESULT CALLBACK IEnumMoniker_Reset_Proxy(
1618     IEnumMoniker* This);
1619 void __RPC_STUB IEnumMoniker_Reset_Stub(
1620     struct IRpcStubBuffer* This,
1621     struct IRpcChannelBuffer* pRpcChannelBuffer,
1622     PRPC_MESSAGE pRpcMessage,
1623     DWORD* pdwStubPhase);
1624 HRESULT CALLBACK IEnumMoniker_Clone_Proxy(
1625     IEnumMoniker* This,
1626     IEnumMoniker** ppenum);
1627 void __RPC_STUB IEnumMoniker_Clone_Stub(
1628     struct IRpcStubBuffer* This,
1629     struct IRpcChannelBuffer* pRpcChannelBuffer,
1630     PRPC_MESSAGE pRpcMessage,
1631     DWORD* pdwStubPhase);
1632
1633 typedef struct IRunnableObject IRunnableObject;
1634 typedef IRunnableObject *LPRUNNABLEOBJECT;
1635
1636 /*****************************************************************************
1637  * IRunnableObject interface
1638  */
1639 DEFINE_GUID(IID_IRunnableObject, 0x00000126, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
1640 #if defined(__cplusplus) && !defined(CINTERFACE)
1641 struct IRunnableObject : public IUnknown
1642 {
1643     virtual HRESULT STDMETHODCALLTYPE GetRunningClass(
1644         LPCLSID lpClsid) = 0;
1645
1646     virtual HRESULT STDMETHODCALLTYPE Run(
1647         LPBINDCTX pbc) = 0;
1648
1649     virtual BOOL STDMETHODCALLTYPE IsRunning(
1650         ) = 0;
1651
1652     virtual HRESULT STDMETHODCALLTYPE LockRunning(
1653         BOOL fLock,
1654         BOOL fLastUnlockCloses) = 0;
1655
1656     virtual HRESULT STDMETHODCALLTYPE SetContainedObject(
1657         BOOL fContained) = 0;
1658
1659 };
1660 #else
1661 typedef struct IRunnableObjectVtbl IRunnableObjectVtbl;
1662 struct IRunnableObject {
1663     const IRunnableObjectVtbl* lpVtbl;
1664 };
1665 struct IRunnableObjectVtbl {
1666     ICOM_MSVTABLE_COMPAT_FIELDS
1667
1668     /*** IUnknown methods ***/
1669     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
1670         IRunnableObject* This,
1671         REFIID riid,
1672         void** ppvObject);
1673
1674     ULONG (STDMETHODCALLTYPE *AddRef)(
1675         IRunnableObject* This);
1676
1677     ULONG (STDMETHODCALLTYPE *Release)(
1678         IRunnableObject* This);
1679
1680     /*** IRunnableObject methods ***/
1681     HRESULT (STDMETHODCALLTYPE *GetRunningClass)(
1682         IRunnableObject* This,
1683         LPCLSID lpClsid);
1684
1685     HRESULT (STDMETHODCALLTYPE *Run)(
1686         IRunnableObject* This,
1687         LPBINDCTX pbc);
1688
1689     BOOL (STDMETHODCALLTYPE *IsRunning)(
1690         IRunnableObject* This);
1691
1692     HRESULT (STDMETHODCALLTYPE *LockRunning)(
1693         IRunnableObject* This,
1694         BOOL fLock,
1695         BOOL fLastUnlockCloses);
1696
1697     HRESULT (STDMETHODCALLTYPE *SetContainedObject)(
1698         IRunnableObject* This,
1699         BOOL fContained);
1700
1701 };
1702
1703 /*** IUnknown methods ***/
1704 #define IRunnableObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1705 #define IRunnableObject_AddRef(p) (p)->lpVtbl->AddRef(p)
1706 #define IRunnableObject_Release(p) (p)->lpVtbl->Release(p)
1707 /*** IRunnableObject methods ***/
1708 #define IRunnableObject_GetRunningClass(p,a) (p)->lpVtbl->GetRunningClass(p,a)
1709 #define IRunnableObject_Run(p,a) (p)->lpVtbl->Run(p,a)
1710 #define IRunnableObject_IsRunning(p) (p)->lpVtbl->IsRunning(p)
1711 #define IRunnableObject_LockRunning(p,a,b) (p)->lpVtbl->LockRunning(p,a,b)
1712 #define IRunnableObject_SetContainedObject(p,a) (p)->lpVtbl->SetContainedObject(p,a)
1713
1714 #endif
1715
1716 #define IRunnableObject_METHODS \
1717     ICOM_MSVTABLE_COMPAT_FIELDS \
1718     /*** IUnknown methods ***/ \
1719     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
1720     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
1721     STDMETHOD_(ULONG,Release)(THIS) PURE; \
1722     /*** IRunnableObject methods ***/ \
1723     STDMETHOD_(HRESULT,GetRunningClass)(THIS_ LPCLSID lpClsid) PURE; \
1724     STDMETHOD_(HRESULT,Run)(THIS_ LPBINDCTX pbc) PURE; \
1725     STDMETHOD_(BOOL,IsRunning)(THIS) PURE; \
1726     STDMETHOD_(HRESULT,LockRunning)(THIS_ BOOL fLock, BOOL fLastUnlockCloses) PURE; \
1727     STDMETHOD_(HRESULT,SetContainedObject)(THIS_ BOOL fContained) PURE;
1728
1729 HRESULT CALLBACK IRunnableObject_GetRunningClass_Proxy(
1730     IRunnableObject* This,
1731     LPCLSID lpClsid);
1732 void __RPC_STUB IRunnableObject_GetRunningClass_Stub(
1733     struct IRpcStubBuffer* This,
1734     struct IRpcChannelBuffer* pRpcChannelBuffer,
1735     PRPC_MESSAGE pRpcMessage,
1736     DWORD* pdwStubPhase);
1737 HRESULT CALLBACK IRunnableObject_Run_Proxy(
1738     IRunnableObject* This,
1739     LPBINDCTX pbc);
1740 void __RPC_STUB IRunnableObject_Run_Stub(
1741     struct IRpcStubBuffer* This,
1742     struct IRpcChannelBuffer* pRpcChannelBuffer,
1743     PRPC_MESSAGE pRpcMessage,
1744     DWORD* pdwStubPhase);
1745 HRESULT CALLBACK IRunnableObject_RemoteIsRunning_Proxy(
1746     IRunnableObject* This);
1747 void __RPC_STUB IRunnableObject_RemoteIsRunning_Stub(
1748     struct IRpcStubBuffer* This,
1749     struct IRpcChannelBuffer* pRpcChannelBuffer,
1750     PRPC_MESSAGE pRpcMessage,
1751     DWORD* pdwStubPhase);
1752 BOOL CALLBACK IRunnableObject_IsRunning_Proxy(
1753     IRunnableObject* This);
1754 HRESULT __RPC_STUB IRunnableObject_IsRunning_Stub(
1755     IRunnableObject* This);
1756 HRESULT CALLBACK IRunnableObject_LockRunning_Proxy(
1757     IRunnableObject* This,
1758     BOOL fLock,
1759     BOOL fLastUnlockCloses);
1760 void __RPC_STUB IRunnableObject_LockRunning_Stub(
1761     struct IRpcStubBuffer* This,
1762     struct IRpcChannelBuffer* pRpcChannelBuffer,
1763     PRPC_MESSAGE pRpcMessage,
1764     DWORD* pdwStubPhase);
1765 HRESULT CALLBACK IRunnableObject_SetContainedObject_Proxy(
1766     IRunnableObject* This,
1767     BOOL fContained);
1768 void __RPC_STUB IRunnableObject_SetContainedObject_Stub(
1769     struct IRpcStubBuffer* This,
1770     struct IRpcChannelBuffer* pRpcChannelBuffer,
1771     PRPC_MESSAGE pRpcMessage,
1772     DWORD* pdwStubPhase);
1773
1774 #ifdef __WINESRC__
1775 #undef GetObject
1776 #endif
1777 typedef IRunningObjectTable *LPRUNNINGOBJECTTABLE;
1778
1779 /*****************************************************************************
1780  * IRunningObjectTable interface
1781  */
1782 DEFINE_GUID(IID_IRunningObjectTable, 0x00000010, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
1783 #if defined(__cplusplus) && !defined(CINTERFACE)
1784 struct IRunningObjectTable : public IUnknown
1785 {
1786     virtual HRESULT STDMETHODCALLTYPE Register(
1787         DWORD grfFlags,
1788         IUnknown* punkObject,
1789         IMoniker* pmkObjectName,
1790         DWORD* pdwRegister) = 0;
1791
1792     virtual HRESULT STDMETHODCALLTYPE Revoke(
1793         DWORD dwRegister) = 0;
1794
1795     virtual HRESULT STDMETHODCALLTYPE IsRunning(
1796         IMoniker* pmkObjectName) = 0;
1797
1798     virtual HRESULT STDMETHODCALLTYPE GetObject(
1799         IMoniker* pmkObjectName,
1800         IUnknown** ppunkObject) = 0;
1801
1802     virtual HRESULT STDMETHODCALLTYPE NoteChangeTime(
1803         DWORD dwRegister,
1804         FILETIME* pfiletime) = 0;
1805
1806     virtual HRESULT STDMETHODCALLTYPE GetTimeOfLastChange(
1807         IMoniker* pmkObjectName,
1808         FILETIME* pfiletime) = 0;
1809
1810     virtual HRESULT STDMETHODCALLTYPE EnumRunning(
1811         IEnumMoniker** ppenumMoniker) = 0;
1812
1813 };
1814 #else
1815 typedef struct IRunningObjectTableVtbl IRunningObjectTableVtbl;
1816 struct IRunningObjectTable {
1817     const IRunningObjectTableVtbl* lpVtbl;
1818 };
1819 struct IRunningObjectTableVtbl {
1820     ICOM_MSVTABLE_COMPAT_FIELDS
1821
1822     /*** IUnknown methods ***/
1823     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
1824         IRunningObjectTable* This,
1825         REFIID riid,
1826         void** ppvObject);
1827
1828     ULONG (STDMETHODCALLTYPE *AddRef)(
1829         IRunningObjectTable* This);
1830
1831     ULONG (STDMETHODCALLTYPE *Release)(
1832         IRunningObjectTable* This);
1833
1834     /*** IRunningObjectTable methods ***/
1835     HRESULT (STDMETHODCALLTYPE *Register)(
1836         IRunningObjectTable* This,
1837         DWORD grfFlags,
1838         IUnknown* punkObject,
1839         IMoniker* pmkObjectName,
1840         DWORD* pdwRegister);
1841
1842     HRESULT (STDMETHODCALLTYPE *Revoke)(
1843         IRunningObjectTable* This,
1844         DWORD dwRegister);
1845
1846     HRESULT (STDMETHODCALLTYPE *IsRunning)(
1847         IRunningObjectTable* This,
1848         IMoniker* pmkObjectName);
1849
1850     HRESULT (STDMETHODCALLTYPE *GetObject)(
1851         IRunningObjectTable* This,
1852         IMoniker* pmkObjectName,
1853         IUnknown** ppunkObject);
1854
1855     HRESULT (STDMETHODCALLTYPE *NoteChangeTime)(
1856         IRunningObjectTable* This,
1857         DWORD dwRegister,
1858         FILETIME* pfiletime);
1859
1860     HRESULT (STDMETHODCALLTYPE *GetTimeOfLastChange)(
1861         IRunningObjectTable* This,
1862         IMoniker* pmkObjectName,
1863         FILETIME* pfiletime);
1864
1865     HRESULT (STDMETHODCALLTYPE *EnumRunning)(
1866         IRunningObjectTable* This,
1867         IEnumMoniker** ppenumMoniker);
1868
1869 };
1870
1871 /*** IUnknown methods ***/
1872 #define IRunningObjectTable_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1873 #define IRunningObjectTable_AddRef(p) (p)->lpVtbl->AddRef(p)
1874 #define IRunningObjectTable_Release(p) (p)->lpVtbl->Release(p)
1875 /*** IRunningObjectTable methods ***/
1876 #define IRunningObjectTable_Register(p,a,b,c,d) (p)->lpVtbl->Register(p,a,b,c,d)
1877 #define IRunningObjectTable_Revoke(p,a) (p)->lpVtbl->Revoke(p,a)
1878 #define IRunningObjectTable_IsRunning(p,a) (p)->lpVtbl->IsRunning(p,a)
1879 #define IRunningObjectTable_GetObject(p,a,b) (p)->lpVtbl->GetObject(p,a,b)
1880 #define IRunningObjectTable_NoteChangeTime(p,a,b) (p)->lpVtbl->NoteChangeTime(p,a,b)
1881 #define IRunningObjectTable_GetTimeOfLastChange(p,a,b) (p)->lpVtbl->GetTimeOfLastChange(p,a,b)
1882 #define IRunningObjectTable_EnumRunning(p,a) (p)->lpVtbl->EnumRunning(p,a)
1883
1884 #endif
1885
1886 #define IRunningObjectTable_METHODS \
1887     ICOM_MSVTABLE_COMPAT_FIELDS \
1888     /*** IUnknown methods ***/ \
1889     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
1890     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
1891     STDMETHOD_(ULONG,Release)(THIS) PURE; \
1892     /*** IRunningObjectTable methods ***/ \
1893     STDMETHOD_(HRESULT,Register)(THIS_ DWORD grfFlags, IUnknown* punkObject, IMoniker* pmkObjectName, DWORD* pdwRegister) PURE; \
1894     STDMETHOD_(HRESULT,Revoke)(THIS_ DWORD dwRegister) PURE; \
1895     STDMETHOD_(HRESULT,IsRunning)(THIS_ IMoniker* pmkObjectName) PURE; \
1896     STDMETHOD_(HRESULT,GetObject)(THIS_ IMoniker* pmkObjectName, IUnknown** ppunkObject) PURE; \
1897     STDMETHOD_(HRESULT,NoteChangeTime)(THIS_ DWORD dwRegister, FILETIME* pfiletime) PURE; \
1898     STDMETHOD_(HRESULT,GetTimeOfLastChange)(THIS_ IMoniker* pmkObjectName, FILETIME* pfiletime) PURE; \
1899     STDMETHOD_(HRESULT,EnumRunning)(THIS_ IEnumMoniker** ppenumMoniker) PURE;
1900
1901 HRESULT CALLBACK IRunningObjectTable_Register_Proxy(
1902     IRunningObjectTable* This,
1903     DWORD grfFlags,
1904     IUnknown* punkObject,
1905     IMoniker* pmkObjectName,
1906     DWORD* pdwRegister);
1907 void __RPC_STUB IRunningObjectTable_Register_Stub(
1908     struct IRpcStubBuffer* This,
1909     struct IRpcChannelBuffer* pRpcChannelBuffer,
1910     PRPC_MESSAGE pRpcMessage,
1911     DWORD* pdwStubPhase);
1912 HRESULT CALLBACK IRunningObjectTable_Revoke_Proxy(
1913     IRunningObjectTable* This,
1914     DWORD dwRegister);
1915 void __RPC_STUB IRunningObjectTable_Revoke_Stub(
1916     struct IRpcStubBuffer* This,
1917     struct IRpcChannelBuffer* pRpcChannelBuffer,
1918     PRPC_MESSAGE pRpcMessage,
1919     DWORD* pdwStubPhase);
1920 HRESULT CALLBACK IRunningObjectTable_IsRunning_Proxy(
1921     IRunningObjectTable* This,
1922     IMoniker* pmkObjectName);
1923 void __RPC_STUB IRunningObjectTable_IsRunning_Stub(
1924     struct IRpcStubBuffer* This,
1925     struct IRpcChannelBuffer* pRpcChannelBuffer,
1926     PRPC_MESSAGE pRpcMessage,
1927     DWORD* pdwStubPhase);
1928 HRESULT CALLBACK IRunningObjectTable_GetObject_Proxy(
1929     IRunningObjectTable* This,
1930     IMoniker* pmkObjectName,
1931     IUnknown** ppunkObject);
1932 void __RPC_STUB IRunningObjectTable_GetObject_Stub(
1933     struct IRpcStubBuffer* This,
1934     struct IRpcChannelBuffer* pRpcChannelBuffer,
1935     PRPC_MESSAGE pRpcMessage,
1936     DWORD* pdwStubPhase);
1937 HRESULT CALLBACK IRunningObjectTable_NoteChangeTime_Proxy(
1938     IRunningObjectTable* This,
1939     DWORD dwRegister,
1940     FILETIME* pfiletime);
1941 void __RPC_STUB IRunningObjectTable_NoteChangeTime_Stub(
1942     struct IRpcStubBuffer* This,
1943     struct IRpcChannelBuffer* pRpcChannelBuffer,
1944     PRPC_MESSAGE pRpcMessage,
1945     DWORD* pdwStubPhase);
1946 HRESULT CALLBACK IRunningObjectTable_GetTimeOfLastChange_Proxy(
1947     IRunningObjectTable* This,
1948     IMoniker* pmkObjectName,
1949     FILETIME* pfiletime);
1950 void __RPC_STUB IRunningObjectTable_GetTimeOfLastChange_Stub(
1951     struct IRpcStubBuffer* This,
1952     struct IRpcChannelBuffer* pRpcChannelBuffer,
1953     PRPC_MESSAGE pRpcMessage,
1954     DWORD* pdwStubPhase);
1955 HRESULT CALLBACK IRunningObjectTable_EnumRunning_Proxy(
1956     IRunningObjectTable* This,
1957     IEnumMoniker** ppenumMoniker);
1958 void __RPC_STUB IRunningObjectTable_EnumRunning_Stub(
1959     struct IRpcStubBuffer* This,
1960     struct IRpcChannelBuffer* pRpcChannelBuffer,
1961     PRPC_MESSAGE pRpcMessage,
1962     DWORD* pdwStubPhase);
1963
1964 typedef struct IPersist IPersist;
1965 typedef IPersist *LPPERSIST;
1966
1967 /*****************************************************************************
1968  * IPersist interface
1969  */
1970 DEFINE_GUID(IID_IPersist, 0x0000010c, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
1971 #if defined(__cplusplus) && !defined(CINTERFACE)
1972 struct IPersist : public IUnknown
1973 {
1974     virtual HRESULT STDMETHODCALLTYPE GetClassID(
1975         CLSID* pClassID) = 0;
1976
1977 };
1978 #else
1979 typedef struct IPersistVtbl IPersistVtbl;
1980 struct IPersist {
1981     const IPersistVtbl* lpVtbl;
1982 };
1983 struct IPersistVtbl {
1984     ICOM_MSVTABLE_COMPAT_FIELDS
1985
1986     /*** IUnknown methods ***/
1987     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
1988         IPersist* This,
1989         REFIID riid,
1990         void** ppvObject);
1991
1992     ULONG (STDMETHODCALLTYPE *AddRef)(
1993         IPersist* This);
1994
1995     ULONG (STDMETHODCALLTYPE *Release)(
1996         IPersist* This);
1997
1998     /*** IPersist methods ***/
1999     HRESULT (STDMETHODCALLTYPE *GetClassID)(
2000         IPersist* This,
2001         CLSID* pClassID);
2002
2003 };
2004
2005 /*** IUnknown methods ***/
2006 #define IPersist_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2007 #define IPersist_AddRef(p) (p)->lpVtbl->AddRef(p)
2008 #define IPersist_Release(p) (p)->lpVtbl->Release(p)
2009 /*** IPersist methods ***/
2010 #define IPersist_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
2011
2012 #endif
2013
2014 #define IPersist_METHODS \
2015     ICOM_MSVTABLE_COMPAT_FIELDS \
2016     /*** IUnknown methods ***/ \
2017     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
2018     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
2019     STDMETHOD_(ULONG,Release)(THIS) PURE; \
2020     /*** IPersist methods ***/ \
2021     STDMETHOD_(HRESULT,GetClassID)(THIS_ CLSID* pClassID) PURE;
2022
2023 HRESULT CALLBACK IPersist_GetClassID_Proxy(
2024     IPersist* This,
2025     CLSID* pClassID);
2026 void __RPC_STUB IPersist_GetClassID_Stub(
2027     struct IRpcStubBuffer* This,
2028     struct IRpcChannelBuffer* pRpcChannelBuffer,
2029     PRPC_MESSAGE pRpcMessage,
2030     DWORD* pdwStubPhase);
2031
2032 typedef struct IPersistStream IPersistStream;
2033 typedef IPersistStream *LPPERSISTSTREAM;
2034
2035 /*****************************************************************************
2036  * IPersistStream interface
2037  */
2038 DEFINE_GUID(IID_IPersistStream, 0x00000109, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
2039 #if defined(__cplusplus) && !defined(CINTERFACE)
2040 struct IPersistStream : public IPersist
2041 {
2042     virtual HRESULT STDMETHODCALLTYPE IsDirty(
2043         ) = 0;
2044
2045     virtual HRESULT STDMETHODCALLTYPE Load(
2046         IStream* pStm) = 0;
2047
2048     virtual HRESULT STDMETHODCALLTYPE Save(
2049         IStream* pStm,
2050         BOOL fClearDirty) = 0;
2051
2052     virtual HRESULT STDMETHODCALLTYPE GetSizeMax(
2053         ULARGE_INTEGER* pcbSize) = 0;
2054
2055 };
2056 #else
2057 typedef struct IPersistStreamVtbl IPersistStreamVtbl;
2058 struct IPersistStream {
2059     const IPersistStreamVtbl* lpVtbl;
2060 };
2061 struct IPersistStreamVtbl {
2062     ICOM_MSVTABLE_COMPAT_FIELDS
2063
2064     /*** IUnknown methods ***/
2065     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
2066         IPersistStream* This,
2067         REFIID riid,
2068         void** ppvObject);
2069
2070     ULONG (STDMETHODCALLTYPE *AddRef)(
2071         IPersistStream* This);
2072
2073     ULONG (STDMETHODCALLTYPE *Release)(
2074         IPersistStream* This);
2075
2076     /*** IPersist methods ***/
2077     HRESULT (STDMETHODCALLTYPE *GetClassID)(
2078         IPersistStream* This,
2079         CLSID* pClassID);
2080
2081     /*** IPersistStream methods ***/
2082     HRESULT (STDMETHODCALLTYPE *IsDirty)(
2083         IPersistStream* This);
2084
2085     HRESULT (STDMETHODCALLTYPE *Load)(
2086         IPersistStream* This,
2087         IStream* pStm);
2088
2089     HRESULT (STDMETHODCALLTYPE *Save)(
2090         IPersistStream* This,
2091         IStream* pStm,
2092         BOOL fClearDirty);
2093
2094     HRESULT (STDMETHODCALLTYPE *GetSizeMax)(
2095         IPersistStream* This,
2096         ULARGE_INTEGER* pcbSize);
2097
2098 };
2099
2100 /*** IUnknown methods ***/
2101 #define IPersistStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2102 #define IPersistStream_AddRef(p) (p)->lpVtbl->AddRef(p)
2103 #define IPersistStream_Release(p) (p)->lpVtbl->Release(p)
2104 /*** IPersist methods ***/
2105 #define IPersistStream_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
2106 /*** IPersistStream methods ***/
2107 #define IPersistStream_IsDirty(p) (p)->lpVtbl->IsDirty(p)
2108 #define IPersistStream_Load(p,a) (p)->lpVtbl->Load(p,a)
2109 #define IPersistStream_Save(p,a,b) (p)->lpVtbl->Save(p,a,b)
2110 #define IPersistStream_GetSizeMax(p,a) (p)->lpVtbl->GetSizeMax(p,a)
2111
2112 #endif
2113
2114 #define IPersistStream_METHODS \
2115     ICOM_MSVTABLE_COMPAT_FIELDS \
2116     /*** IUnknown methods ***/ \
2117     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
2118     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
2119     STDMETHOD_(ULONG,Release)(THIS) PURE; \
2120     /*** IPersist methods ***/ \
2121     STDMETHOD_(HRESULT,GetClassID)(THIS_ CLSID* pClassID) PURE; \
2122     /*** IPersistStream methods ***/ \
2123     STDMETHOD_(HRESULT,IsDirty)(THIS) PURE; \
2124     STDMETHOD_(HRESULT,Load)(THIS_ IStream* pStm) PURE; \
2125     STDMETHOD_(HRESULT,Save)(THIS_ IStream* pStm, BOOL fClearDirty) PURE; \
2126     STDMETHOD_(HRESULT,GetSizeMax)(THIS_ ULARGE_INTEGER* pcbSize) PURE;
2127
2128 HRESULT CALLBACK IPersistStream_IsDirty_Proxy(
2129     IPersistStream* This);
2130 void __RPC_STUB IPersistStream_IsDirty_Stub(
2131     struct IRpcStubBuffer* This,
2132     struct IRpcChannelBuffer* pRpcChannelBuffer,
2133     PRPC_MESSAGE pRpcMessage,
2134     DWORD* pdwStubPhase);
2135 HRESULT CALLBACK IPersistStream_Load_Proxy(
2136     IPersistStream* This,
2137     IStream* pStm);
2138 void __RPC_STUB IPersistStream_Load_Stub(
2139     struct IRpcStubBuffer* This,
2140     struct IRpcChannelBuffer* pRpcChannelBuffer,
2141     PRPC_MESSAGE pRpcMessage,
2142     DWORD* pdwStubPhase);
2143 HRESULT CALLBACK IPersistStream_Save_Proxy(
2144     IPersistStream* This,
2145     IStream* pStm,
2146     BOOL fClearDirty);
2147 void __RPC_STUB IPersistStream_Save_Stub(
2148     struct IRpcStubBuffer* This,
2149     struct IRpcChannelBuffer* pRpcChannelBuffer,
2150     PRPC_MESSAGE pRpcMessage,
2151     DWORD* pdwStubPhase);
2152 HRESULT CALLBACK IPersistStream_GetSizeMax_Proxy(
2153     IPersistStream* This,
2154     ULARGE_INTEGER* pcbSize);
2155 void __RPC_STUB IPersistStream_GetSizeMax_Stub(
2156     struct IRpcStubBuffer* This,
2157     struct IRpcChannelBuffer* pRpcChannelBuffer,
2158     PRPC_MESSAGE pRpcMessage,
2159     DWORD* pdwStubPhase);
2160
2161 typedef IMoniker *LPMONIKER;
2162
2163 typedef enum tagMKSYS {
2164     MKSYS_NONE = 0,
2165     MKSYS_GENERICCOMPOSITE = 1,
2166     MKSYS_FILEMONIKER = 2,
2167     MKSYS_ANTIMONIKER = 3,
2168     MKSYS_ITEMMONIKER = 4,
2169     MKSYS_POINTERMONIKER = 5,
2170     MKSYS_CLASSMONIKER = 7
2171 } MKSYS;
2172
2173 typedef enum tagMKREDUCE {
2174     MKRREDUCE_ONE = 3 << 16,
2175     MKRREDUCE_TOUSER = 2 << 16,
2176     MKRREDUCE_THROUGHUSER = 1 << 16,
2177     MKRREDUCE_ALL = 0
2178 } MKRREDUCE;
2179
2180 /*****************************************************************************
2181  * IMoniker interface
2182  */
2183 DEFINE_GUID(IID_IMoniker, 0x0000000f, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
2184 #if defined(__cplusplus) && !defined(CINTERFACE)
2185 struct IMoniker : public IPersistStream
2186 {
2187     virtual HRESULT STDMETHODCALLTYPE BindToObject(
2188         IBindCtx* pbc,
2189         IMoniker* pmkToLeft,
2190         REFIID riidResult,
2191         void** ppvResult) = 0;
2192
2193     virtual HRESULT STDMETHODCALLTYPE BindToStorage(
2194         IBindCtx* pbc,
2195         IMoniker* pmkToLeft,
2196         REFIID riid,
2197         void** ppvObj) = 0;
2198
2199     virtual HRESULT STDMETHODCALLTYPE Reduce(
2200         IBindCtx* pbc,
2201         DWORD dwReduceHowFar,
2202         IMoniker** ppmkToLeft,
2203         IMoniker** ppmkReduced) = 0;
2204
2205     virtual HRESULT STDMETHODCALLTYPE ComposeWith(
2206         IMoniker* pmkRight,
2207         BOOL fOnlyIfNotGeneric,
2208         IMoniker** ppmkComposite) = 0;
2209
2210     virtual HRESULT STDMETHODCALLTYPE Enum(
2211         BOOL fForward,
2212         IEnumMoniker** ppenumMoniker) = 0;
2213
2214     virtual HRESULT STDMETHODCALLTYPE IsEqual(
2215         IMoniker* pmkOtherMoniker) = 0;
2216
2217     virtual HRESULT STDMETHODCALLTYPE Hash(
2218         DWORD* pdwHash) = 0;
2219
2220     virtual HRESULT STDMETHODCALLTYPE IsRunning(
2221         IBindCtx* pbc,
2222         IMoniker* pmkToLeft,
2223         IMoniker* pmkNewlyRunning) = 0;
2224
2225     virtual HRESULT STDMETHODCALLTYPE GetTimeOfLastChange(
2226         IBindCtx* pbc,
2227         IMoniker* pmkToLeft,
2228         FILETIME* pFileTime) = 0;
2229
2230     virtual HRESULT STDMETHODCALLTYPE Inverse(
2231         IMoniker** ppmk) = 0;
2232
2233     virtual HRESULT STDMETHODCALLTYPE CommonPrefixWith(
2234         IMoniker* pmkOther,
2235         IMoniker** ppmkPrefix) = 0;
2236
2237     virtual HRESULT STDMETHODCALLTYPE RelativePathTo(
2238         IMoniker* pmkOther,
2239         IMoniker** ppmkRelPath) = 0;
2240
2241     virtual HRESULT STDMETHODCALLTYPE GetDisplayName(
2242         IBindCtx* pbc,
2243         IMoniker* pmkToLeft,
2244         LPOLESTR* ppszDisplayName) = 0;
2245
2246     virtual HRESULT STDMETHODCALLTYPE ParseDisplayName(
2247         IBindCtx* pbc,
2248         IMoniker* pmkToLeft,
2249         LPOLESTR pszDisplayName,
2250         ULONG* pchEaten,
2251         IMoniker** ppmkOut) = 0;
2252
2253     virtual HRESULT STDMETHODCALLTYPE IsSystemMoniker(
2254         DWORD* pdwMksys) = 0;
2255
2256 };
2257 #else
2258 typedef struct IMonikerVtbl IMonikerVtbl;
2259 struct IMoniker {
2260     const IMonikerVtbl* lpVtbl;
2261 };
2262 struct IMonikerVtbl {
2263     ICOM_MSVTABLE_COMPAT_FIELDS
2264
2265     /*** IUnknown methods ***/
2266     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
2267         IMoniker* This,
2268         REFIID riid,
2269         void** ppvObject);
2270
2271     ULONG (STDMETHODCALLTYPE *AddRef)(
2272         IMoniker* This);
2273
2274     ULONG (STDMETHODCALLTYPE *Release)(
2275         IMoniker* This);
2276
2277     /*** IPersist methods ***/
2278     HRESULT (STDMETHODCALLTYPE *GetClassID)(
2279         IMoniker* This,
2280         CLSID* pClassID);
2281
2282     /*** IPersistStream methods ***/
2283     HRESULT (STDMETHODCALLTYPE *IsDirty)(
2284         IMoniker* This);
2285
2286     HRESULT (STDMETHODCALLTYPE *Load)(
2287         IMoniker* This,
2288         IStream* pStm);
2289
2290     HRESULT (STDMETHODCALLTYPE *Save)(
2291         IMoniker* This,
2292         IStream* pStm,
2293         BOOL fClearDirty);
2294
2295     HRESULT (STDMETHODCALLTYPE *GetSizeMax)(
2296         IMoniker* This,
2297         ULARGE_INTEGER* pcbSize);
2298
2299     /*** IMoniker methods ***/
2300     HRESULT (STDMETHODCALLTYPE *BindToObject)(
2301         IMoniker* This,
2302         IBindCtx* pbc,
2303         IMoniker* pmkToLeft,
2304         REFIID riidResult,
2305         void** ppvResult);
2306
2307     HRESULT (STDMETHODCALLTYPE *BindToStorage)(
2308         IMoniker* This,
2309         IBindCtx* pbc,
2310         IMoniker* pmkToLeft,
2311         REFIID riid,
2312         void** ppvObj);
2313
2314     HRESULT (STDMETHODCALLTYPE *Reduce)(
2315         IMoniker* This,
2316         IBindCtx* pbc,
2317         DWORD dwReduceHowFar,
2318         IMoniker** ppmkToLeft,
2319         IMoniker** ppmkReduced);
2320
2321     HRESULT (STDMETHODCALLTYPE *ComposeWith)(
2322         IMoniker* This,
2323         IMoniker* pmkRight,
2324         BOOL fOnlyIfNotGeneric,
2325         IMoniker** ppmkComposite);
2326
2327     HRESULT (STDMETHODCALLTYPE *Enum)(
2328         IMoniker* This,
2329         BOOL fForward,
2330         IEnumMoniker** ppenumMoniker);
2331
2332     HRESULT (STDMETHODCALLTYPE *IsEqual)(
2333         IMoniker* This,
2334         IMoniker* pmkOtherMoniker);
2335
2336     HRESULT (STDMETHODCALLTYPE *Hash)(
2337         IMoniker* This,
2338         DWORD* pdwHash);
2339
2340     HRESULT (STDMETHODCALLTYPE *IsRunning)(
2341         IMoniker* This,
2342         IBindCtx* pbc,
2343         IMoniker* pmkToLeft,
2344         IMoniker* pmkNewlyRunning);
2345
2346     HRESULT (STDMETHODCALLTYPE *GetTimeOfLastChange)(
2347         IMoniker* This,
2348         IBindCtx* pbc,
2349         IMoniker* pmkToLeft,
2350         FILETIME* pFileTime);
2351
2352     HRESULT (STDMETHODCALLTYPE *Inverse)(
2353         IMoniker* This,
2354         IMoniker** ppmk);
2355
2356     HRESULT (STDMETHODCALLTYPE *CommonPrefixWith)(
2357         IMoniker* This,
2358         IMoniker* pmkOther,
2359         IMoniker** ppmkPrefix);
2360
2361     HRESULT (STDMETHODCALLTYPE *RelativePathTo)(
2362         IMoniker* This,
2363         IMoniker* pmkOther,
2364         IMoniker** ppmkRelPath);
2365
2366     HRESULT (STDMETHODCALLTYPE *GetDisplayName)(
2367         IMoniker* This,
2368         IBindCtx* pbc,
2369         IMoniker* pmkToLeft,
2370         LPOLESTR* ppszDisplayName);
2371
2372     HRESULT (STDMETHODCALLTYPE *ParseDisplayName)(
2373         IMoniker* This,
2374         IBindCtx* pbc,
2375         IMoniker* pmkToLeft,
2376         LPOLESTR pszDisplayName,
2377         ULONG* pchEaten,
2378         IMoniker** ppmkOut);
2379
2380     HRESULT (STDMETHODCALLTYPE *IsSystemMoniker)(
2381         IMoniker* This,
2382         DWORD* pdwMksys);
2383
2384 };
2385
2386 /*** IUnknown methods ***/
2387 #define IMoniker_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2388 #define IMoniker_AddRef(p) (p)->lpVtbl->AddRef(p)
2389 #define IMoniker_Release(p) (p)->lpVtbl->Release(p)
2390 /*** IPersist methods ***/
2391 #define IMoniker_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
2392 /*** IPersistStream methods ***/
2393 #define IMoniker_IsDirty(p) (p)->lpVtbl->IsDirty(p)
2394 #define IMoniker_Load(p,a) (p)->lpVtbl->Load(p,a)
2395 #define IMoniker_Save(p,a,b) (p)->lpVtbl->Save(p,a,b)
2396 #define IMoniker_GetSizeMax(p,a) (p)->lpVtbl->GetSizeMax(p,a)
2397 /*** IMoniker methods ***/
2398 #define IMoniker_BindToObject(p,a,b,c,d) (p)->lpVtbl->BindToObject(p,a,b,c,d)
2399 #define IMoniker_BindToStorage(p,a,b,c,d) (p)->lpVtbl->BindToStorage(p,a,b,c,d)
2400 #define IMoniker_Reduce(p,a,b,c,d) (p)->lpVtbl->Reduce(p,a,b,c,d)
2401 #define IMoniker_ComposeWith(p,a,b,c) (p)->lpVtbl->ComposeWith(p,a,b,c)
2402 #define IMoniker_Enum(p,a,b) (p)->lpVtbl->Enum(p,a,b)
2403 #define IMoniker_IsEqual(p,a) (p)->lpVtbl->IsEqual(p,a)
2404 #define IMoniker_Hash(p,a) (p)->lpVtbl->Hash(p,a)
2405 #define IMoniker_IsRunning(p,a,b,c) (p)->lpVtbl->IsRunning(p,a,b,c)
2406 #define IMoniker_GetTimeOfLastChange(p,a,b,c) (p)->lpVtbl->GetTimeOfLastChange(p,a,b,c)
2407 #define IMoniker_Inverse(p,a) (p)->lpVtbl->Inverse(p,a)
2408 #define IMoniker_CommonPrefixWith(p,a,b) (p)->lpVtbl->CommonPrefixWith(p,a,b)
2409 #define IMoniker_RelativePathTo(p,a,b) (p)->lpVtbl->RelativePathTo(p,a,b)
2410 #define IMoniker_GetDisplayName(p,a,b,c) (p)->lpVtbl->GetDisplayName(p,a,b,c)
2411 #define IMoniker_ParseDisplayName(p,a,b,c,d,e) (p)->lpVtbl->ParseDisplayName(p,a,b,c,d,e)
2412 #define IMoniker_IsSystemMoniker(p,a) (p)->lpVtbl->IsSystemMoniker(p,a)
2413
2414 #endif
2415
2416 #define IMoniker_METHODS \
2417     ICOM_MSVTABLE_COMPAT_FIELDS \
2418     /*** IUnknown methods ***/ \
2419     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
2420     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
2421     STDMETHOD_(ULONG,Release)(THIS) PURE; \
2422     /*** IPersist methods ***/ \
2423     STDMETHOD_(HRESULT,GetClassID)(THIS_ CLSID* pClassID) PURE; \
2424     /*** IPersistStream methods ***/ \
2425     STDMETHOD_(HRESULT,IsDirty)(THIS) PURE; \
2426     STDMETHOD_(HRESULT,Load)(THIS_ IStream* pStm) PURE; \
2427     STDMETHOD_(HRESULT,Save)(THIS_ IStream* pStm, BOOL fClearDirty) PURE; \
2428     STDMETHOD_(HRESULT,GetSizeMax)(THIS_ ULARGE_INTEGER* pcbSize) PURE; \
2429     /*** IMoniker methods ***/ \
2430     STDMETHOD_(HRESULT,BindToObject)(THIS_ IBindCtx* pbc, IMoniker* pmkToLeft, REFIID riidResult, void** ppvResult) PURE; \
2431     STDMETHOD_(HRESULT,BindToStorage)(THIS_ IBindCtx* pbc, IMoniker* pmkToLeft, REFIID riid, void** ppvObj) PURE; \
2432     STDMETHOD_(HRESULT,Reduce)(THIS_ IBindCtx* pbc, DWORD dwReduceHowFar, IMoniker** ppmkToLeft, IMoniker** ppmkReduced) PURE; \
2433     STDMETHOD_(HRESULT,ComposeWith)(THIS_ IMoniker* pmkRight, BOOL fOnlyIfNotGeneric, IMoniker** ppmkComposite) PURE; \
2434     STDMETHOD_(HRESULT,Enum)(THIS_ BOOL fForward, IEnumMoniker** ppenumMoniker) PURE; \
2435     STDMETHOD_(HRESULT,IsEqual)(THIS_ IMoniker* pmkOtherMoniker) PURE; \
2436     STDMETHOD_(HRESULT,Hash)(THIS_ DWORD* pdwHash) PURE; \
2437     STDMETHOD_(HRESULT,IsRunning)(THIS_ IBindCtx* pbc, IMoniker* pmkToLeft, IMoniker* pmkNewlyRunning) PURE; \
2438     STDMETHOD_(HRESULT,GetTimeOfLastChange)(THIS_ IBindCtx* pbc, IMoniker* pmkToLeft, FILETIME* pFileTime) PURE; \
2439     STDMETHOD_(HRESULT,Inverse)(THIS_ IMoniker** ppmk) PURE; \
2440     STDMETHOD_(HRESULT,CommonPrefixWith)(THIS_ IMoniker* pmkOther, IMoniker** ppmkPrefix) PURE; \
2441     STDMETHOD_(HRESULT,RelativePathTo)(THIS_ IMoniker* pmkOther, IMoniker** ppmkRelPath) PURE; \
2442     STDMETHOD_(HRESULT,GetDisplayName)(THIS_ IBindCtx* pbc, IMoniker* pmkToLeft, LPOLESTR* ppszDisplayName) PURE; \
2443     STDMETHOD_(HRESULT,ParseDisplayName)(THIS_ IBindCtx* pbc, IMoniker* pmkToLeft, LPOLESTR pszDisplayName, ULONG* pchEaten, IMoniker** ppmkOut) PURE; \
2444     STDMETHOD_(HRESULT,IsSystemMoniker)(THIS_ DWORD* pdwMksys) PURE;
2445
2446 HRESULT CALLBACK IMoniker_RemoteBindToObject_Proxy(
2447     IMoniker* This,
2448     IBindCtx* pbc,
2449     IMoniker* pmkToLeft,
2450     REFIID riidResult,
2451     IUnknown** ppvResult);
2452 void __RPC_STUB IMoniker_RemoteBindToObject_Stub(
2453     struct IRpcStubBuffer* This,
2454     struct IRpcChannelBuffer* pRpcChannelBuffer,
2455     PRPC_MESSAGE pRpcMessage,
2456     DWORD* pdwStubPhase);
2457 HRESULT CALLBACK IMoniker_BindToObject_Proxy(
2458     IMoniker* This,
2459     IBindCtx* pbc,
2460     IMoniker* pmkToLeft,
2461     REFIID riidResult,
2462     void** ppvResult);
2463 HRESULT __RPC_STUB IMoniker_BindToObject_Stub(
2464     IMoniker* This,
2465     IBindCtx* pbc,
2466     IMoniker* pmkToLeft,
2467     REFIID riidResult,
2468     IUnknown** ppvResult);
2469 HRESULT CALLBACK IMoniker_RemoteBindToStorage_Proxy(
2470     IMoniker* This,
2471     IBindCtx* pbc,
2472     IMoniker* pmkToLeft,
2473     REFIID riid,
2474     IUnknown** ppvObj);
2475 void __RPC_STUB IMoniker_RemoteBindToStorage_Stub(
2476     struct IRpcStubBuffer* This,
2477     struct IRpcChannelBuffer* pRpcChannelBuffer,
2478     PRPC_MESSAGE pRpcMessage,
2479     DWORD* pdwStubPhase);
2480 HRESULT CALLBACK IMoniker_BindToStorage_Proxy(
2481     IMoniker* This,
2482     IBindCtx* pbc,
2483     IMoniker* pmkToLeft,
2484     REFIID riid,
2485     void** ppvObj);
2486 HRESULT __RPC_STUB IMoniker_BindToStorage_Stub(
2487     IMoniker* This,
2488     IBindCtx* pbc,
2489     IMoniker* pmkToLeft,
2490     REFIID riid,
2491     IUnknown** ppvObj);
2492 HRESULT CALLBACK IMoniker_Reduce_Proxy(
2493     IMoniker* This,
2494     IBindCtx* pbc,
2495     DWORD dwReduceHowFar,
2496     IMoniker** ppmkToLeft,
2497     IMoniker** ppmkReduced);
2498 void __RPC_STUB IMoniker_Reduce_Stub(
2499     struct IRpcStubBuffer* This,
2500     struct IRpcChannelBuffer* pRpcChannelBuffer,
2501     PRPC_MESSAGE pRpcMessage,
2502     DWORD* pdwStubPhase);
2503 HRESULT CALLBACK IMoniker_ComposeWith_Proxy(
2504     IMoniker* This,
2505     IMoniker* pmkRight,
2506     BOOL fOnlyIfNotGeneric,
2507     IMoniker** ppmkComposite);
2508 void __RPC_STUB IMoniker_ComposeWith_Stub(
2509     struct IRpcStubBuffer* This,
2510     struct IRpcChannelBuffer* pRpcChannelBuffer,
2511     PRPC_MESSAGE pRpcMessage,
2512     DWORD* pdwStubPhase);
2513 HRESULT CALLBACK IMoniker_Enum_Proxy(
2514     IMoniker* This,
2515     BOOL fForward,
2516     IEnumMoniker** ppenumMoniker);
2517 void __RPC_STUB IMoniker_Enum_Stub(
2518     struct IRpcStubBuffer* This,
2519     struct IRpcChannelBuffer* pRpcChannelBuffer,
2520     PRPC_MESSAGE pRpcMessage,
2521     DWORD* pdwStubPhase);
2522 HRESULT CALLBACK IMoniker_IsEqual_Proxy(
2523     IMoniker* This,
2524     IMoniker* pmkOtherMoniker);
2525 void __RPC_STUB IMoniker_IsEqual_Stub(
2526     struct IRpcStubBuffer* This,
2527     struct IRpcChannelBuffer* pRpcChannelBuffer,
2528     PRPC_MESSAGE pRpcMessage,
2529     DWORD* pdwStubPhase);
2530 HRESULT CALLBACK IMoniker_Hash_Proxy(
2531     IMoniker* This,
2532     DWORD* pdwHash);
2533 void __RPC_STUB IMoniker_Hash_Stub(
2534     struct IRpcStubBuffer* This,
2535     struct IRpcChannelBuffer* pRpcChannelBuffer,
2536     PRPC_MESSAGE pRpcMessage,
2537     DWORD* pdwStubPhase);
2538 HRESULT CALLBACK IMoniker_IsRunning_Proxy(
2539     IMoniker* This,
2540     IBindCtx* pbc,
2541     IMoniker* pmkToLeft,
2542     IMoniker* pmkNewlyRunning);
2543 void __RPC_STUB IMoniker_IsRunning_Stub(
2544     struct IRpcStubBuffer* This,
2545     struct IRpcChannelBuffer* pRpcChannelBuffer,
2546     PRPC_MESSAGE pRpcMessage,
2547     DWORD* pdwStubPhase);
2548 HRESULT CALLBACK IMoniker_GetTimeOfLastChange_Proxy(
2549     IMoniker* This,
2550     IBindCtx* pbc,
2551     IMoniker* pmkToLeft,
2552     FILETIME* pFileTime);
2553 void __RPC_STUB IMoniker_GetTimeOfLastChange_Stub(
2554     struct IRpcStubBuffer* This,
2555     struct IRpcChannelBuffer* pRpcChannelBuffer,
2556     PRPC_MESSAGE pRpcMessage,
2557     DWORD* pdwStubPhase);
2558 HRESULT CALLBACK IMoniker_Inverse_Proxy(
2559     IMoniker* This,
2560     IMoniker** ppmk);
2561 void __RPC_STUB IMoniker_Inverse_Stub(
2562     struct IRpcStubBuffer* This,
2563     struct IRpcChannelBuffer* pRpcChannelBuffer,
2564     PRPC_MESSAGE pRpcMessage,
2565     DWORD* pdwStubPhase);
2566 HRESULT CALLBACK IMoniker_CommonPrefixWith_Proxy(
2567     IMoniker* This,
2568     IMoniker* pmkOther,
2569     IMoniker** ppmkPrefix);
2570 void __RPC_STUB IMoniker_CommonPrefixWith_Stub(
2571     struct IRpcStubBuffer* This,
2572     struct IRpcChannelBuffer* pRpcChannelBuffer,
2573     PRPC_MESSAGE pRpcMessage,
2574     DWORD* pdwStubPhase);
2575 HRESULT CALLBACK IMoniker_RelativePathTo_Proxy(
2576     IMoniker* This,
2577     IMoniker* pmkOther,
2578     IMoniker** ppmkRelPath);
2579 void __RPC_STUB IMoniker_RelativePathTo_Stub(
2580     struct IRpcStubBuffer* This,
2581     struct IRpcChannelBuffer* pRpcChannelBuffer,
2582     PRPC_MESSAGE pRpcMessage,
2583     DWORD* pdwStubPhase);
2584 HRESULT CALLBACK IMoniker_GetDisplayName_Proxy(
2585     IMoniker* This,
2586     IBindCtx* pbc,
2587     IMoniker* pmkToLeft,
2588     LPOLESTR* ppszDisplayName);
2589 void __RPC_STUB IMoniker_GetDisplayName_Stub(
2590     struct IRpcStubBuffer* This,
2591     struct IRpcChannelBuffer* pRpcChannelBuffer,
2592     PRPC_MESSAGE pRpcMessage,
2593     DWORD* pdwStubPhase);
2594 HRESULT CALLBACK IMoniker_ParseDisplayName_Proxy(
2595     IMoniker* This,
2596     IBindCtx* pbc,
2597     IMoniker* pmkToLeft,
2598     LPOLESTR pszDisplayName,
2599     ULONG* pchEaten,
2600     IMoniker** ppmkOut);
2601 void __RPC_STUB IMoniker_ParseDisplayName_Stub(
2602     struct IRpcStubBuffer* This,
2603     struct IRpcChannelBuffer* pRpcChannelBuffer,
2604     PRPC_MESSAGE pRpcMessage,
2605     DWORD* pdwStubPhase);
2606 HRESULT CALLBACK IMoniker_IsSystemMoniker_Proxy(
2607     IMoniker* This,
2608     DWORD* pdwMksys);
2609 void __RPC_STUB IMoniker_IsSystemMoniker_Stub(
2610     struct IRpcStubBuffer* This,
2611     struct IRpcChannelBuffer* pRpcChannelBuffer,
2612     PRPC_MESSAGE pRpcMessage,
2613     DWORD* pdwStubPhase);
2614
2615 typedef struct IROTData IROTData;
2616 /*****************************************************************************
2617  * IROTData interface
2618  */
2619 DEFINE_GUID(IID_IROTData, 0xf29f6bc0, 0x5021, 0x11ce, 0xaa,0x15, 0x00,0x00,0x69,0x01,0x29,0x3f);
2620 #if defined(__cplusplus) && !defined(CINTERFACE)
2621 struct IROTData : public IUnknown
2622 {
2623     virtual HRESULT STDMETHODCALLTYPE GetComparisonData(
2624         byte* pbData,
2625         ULONG cbMax,
2626         ULONG* pcbData) = 0;
2627
2628 };
2629 #else
2630 typedef struct IROTDataVtbl IROTDataVtbl;
2631 struct IROTData {
2632     const IROTDataVtbl* lpVtbl;
2633 };
2634 struct IROTDataVtbl {
2635     ICOM_MSVTABLE_COMPAT_FIELDS
2636
2637     /*** IUnknown methods ***/
2638     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
2639         IROTData* This,
2640         REFIID riid,
2641         void** ppvObject);
2642
2643     ULONG (STDMETHODCALLTYPE *AddRef)(
2644         IROTData* This);
2645
2646     ULONG (STDMETHODCALLTYPE *Release)(
2647         IROTData* This);
2648
2649     /*** IROTData methods ***/
2650     HRESULT (STDMETHODCALLTYPE *GetComparisonData)(
2651         IROTData* This,
2652         byte* pbData,
2653         ULONG cbMax,
2654         ULONG* pcbData);
2655
2656 };
2657
2658 /*** IUnknown methods ***/
2659 #define IROTData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2660 #define IROTData_AddRef(p) (p)->lpVtbl->AddRef(p)
2661 #define IROTData_Release(p) (p)->lpVtbl->Release(p)
2662 /*** IROTData methods ***/
2663 #define IROTData_GetComparisonData(p,a,b,c) (p)->lpVtbl->GetComparisonData(p,a,b,c)
2664
2665 #endif
2666
2667 #define IROTData_METHODS \
2668     ICOM_MSVTABLE_COMPAT_FIELDS \
2669     /*** IUnknown methods ***/ \
2670     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
2671     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
2672     STDMETHOD_(ULONG,Release)(THIS) PURE; \
2673     /*** IROTData methods ***/ \
2674     STDMETHOD_(HRESULT,GetComparisonData)(THIS_ byte* pbData, ULONG cbMax, ULONG* pcbData) PURE;
2675
2676 HRESULT CALLBACK IROTData_GetComparisonData_Proxy(
2677     IROTData* This,
2678     byte* pbData,
2679     ULONG cbMax,
2680     ULONG* pcbData);
2681 void __RPC_STUB IROTData_GetComparisonData_Stub(
2682     struct IRpcStubBuffer* This,
2683     struct IRpcChannelBuffer* pRpcChannelBuffer,
2684     PRPC_MESSAGE pRpcMessage,
2685     DWORD* pdwStubPhase);
2686
2687 typedef IEnumString *LPENUMSTRING;
2688
2689 /*****************************************************************************
2690  * IEnumString interface
2691  */
2692 DEFINE_GUID(IID_IEnumString, 0x00000101, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
2693 #if defined(__cplusplus) && !defined(CINTERFACE)
2694 struct IEnumString : public IUnknown
2695 {
2696     virtual HRESULT STDMETHODCALLTYPE Next(
2697         ULONG celt,
2698         LPOLESTR* rgelt,
2699         ULONG* pceltFetched) = 0;
2700
2701     virtual HRESULT STDMETHODCALLTYPE Skip(
2702         ULONG celt) = 0;
2703
2704     virtual HRESULT STDMETHODCALLTYPE Reset(
2705         ) = 0;
2706
2707     virtual HRESULT STDMETHODCALLTYPE Clone(
2708         IEnumString** ppenum) = 0;
2709
2710 };
2711 #else
2712 typedef struct IEnumStringVtbl IEnumStringVtbl;
2713 struct IEnumString {
2714     const IEnumStringVtbl* lpVtbl;
2715 };
2716 struct IEnumStringVtbl {
2717     ICOM_MSVTABLE_COMPAT_FIELDS
2718
2719     /*** IUnknown methods ***/
2720     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
2721         IEnumString* This,
2722         REFIID riid,
2723         void** ppvObject);
2724
2725     ULONG (STDMETHODCALLTYPE *AddRef)(
2726         IEnumString* This);
2727
2728     ULONG (STDMETHODCALLTYPE *Release)(
2729         IEnumString* This);
2730
2731     /*** IEnumString methods ***/
2732     HRESULT (STDMETHODCALLTYPE *Next)(
2733         IEnumString* This,
2734         ULONG celt,
2735         LPOLESTR* rgelt,
2736         ULONG* pceltFetched);
2737
2738     HRESULT (STDMETHODCALLTYPE *Skip)(
2739         IEnumString* This,
2740         ULONG celt);
2741
2742     HRESULT (STDMETHODCALLTYPE *Reset)(
2743         IEnumString* This);
2744
2745     HRESULT (STDMETHODCALLTYPE *Clone)(
2746         IEnumString* This,
2747         IEnumString** ppenum);
2748
2749 };
2750
2751 /*** IUnknown methods ***/
2752 #define IEnumString_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2753 #define IEnumString_AddRef(p) (p)->lpVtbl->AddRef(p)
2754 #define IEnumString_Release(p) (p)->lpVtbl->Release(p)
2755 /*** IEnumString methods ***/
2756 #define IEnumString_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
2757 #define IEnumString_Skip(p,a) (p)->lpVtbl->Skip(p,a)
2758 #define IEnumString_Reset(p) (p)->lpVtbl->Reset(p)
2759 #define IEnumString_Clone(p,a) (p)->lpVtbl->Clone(p,a)
2760
2761 #endif
2762
2763 #define IEnumString_METHODS \
2764     ICOM_MSVTABLE_COMPAT_FIELDS \
2765     /*** IUnknown methods ***/ \
2766     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
2767     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
2768     STDMETHOD_(ULONG,Release)(THIS) PURE; \
2769     /*** IEnumString methods ***/ \
2770     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, LPOLESTR* rgelt, ULONG* pceltFetched) PURE; \
2771     STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
2772     STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
2773     STDMETHOD_(HRESULT,Clone)(THIS_ IEnumString** ppenum) PURE;
2774
2775 HRESULT CALLBACK IEnumString_RemoteNext_Proxy(
2776     IEnumString* This,
2777     ULONG celt,
2778     LPOLESTR* rgelt,
2779     ULONG* pceltFetched);
2780 void __RPC_STUB IEnumString_RemoteNext_Stub(
2781     struct IRpcStubBuffer* This,
2782     struct IRpcChannelBuffer* pRpcChannelBuffer,
2783     PRPC_MESSAGE pRpcMessage,
2784     DWORD* pdwStubPhase);
2785 HRESULT CALLBACK IEnumString_Next_Proxy(
2786     IEnumString* This,
2787     ULONG celt,
2788     LPOLESTR* rgelt,
2789     ULONG* pceltFetched);
2790 HRESULT __RPC_STUB IEnumString_Next_Stub(
2791     IEnumString* This,
2792     ULONG celt,
2793     LPOLESTR* rgelt,
2794     ULONG* pceltFetched);
2795 HRESULT CALLBACK IEnumString_Skip_Proxy(
2796     IEnumString* This,
2797     ULONG celt);
2798 void __RPC_STUB IEnumString_Skip_Stub(
2799     struct IRpcStubBuffer* This,
2800     struct IRpcChannelBuffer* pRpcChannelBuffer,
2801     PRPC_MESSAGE pRpcMessage,
2802     DWORD* pdwStubPhase);
2803 HRESULT CALLBACK IEnumString_Reset_Proxy(
2804     IEnumString* This);
2805 void __RPC_STUB IEnumString_Reset_Stub(
2806     struct IRpcStubBuffer* This,
2807     struct IRpcChannelBuffer* pRpcChannelBuffer,
2808     PRPC_MESSAGE pRpcMessage,
2809     DWORD* pdwStubPhase);
2810 HRESULT CALLBACK IEnumString_Clone_Proxy(
2811     IEnumString* This,
2812     IEnumString** ppenum);
2813 void __RPC_STUB IEnumString_Clone_Stub(
2814     struct IRpcStubBuffer* This,
2815     struct IRpcChannelBuffer* pRpcChannelBuffer,
2816     PRPC_MESSAGE pRpcMessage,
2817     DWORD* pdwStubPhase);
2818
2819 typedef struct IClassActivator IClassActivator;
2820 /*****************************************************************************
2821  * IClassActivator interface
2822  */
2823 DEFINE_GUID(IID_IClassActivator, 0x00000140, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
2824 #if defined(__cplusplus) && !defined(CINTERFACE)
2825 struct IClassActivator : public IUnknown
2826 {
2827     virtual HRESULT STDMETHODCALLTYPE GetClassObject(
2828         REFCLSID rclsid,
2829         DWORD dwClassContext,
2830         LCID locale,
2831         REFIID riid,
2832         void** ppv) = 0;
2833
2834 };
2835 #else
2836 typedef struct IClassActivatorVtbl IClassActivatorVtbl;
2837 struct IClassActivator {
2838     const IClassActivatorVtbl* lpVtbl;
2839 };
2840 struct IClassActivatorVtbl {
2841     ICOM_MSVTABLE_COMPAT_FIELDS
2842
2843     /*** IUnknown methods ***/
2844     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
2845         IClassActivator* This,
2846         REFIID riid,
2847         void** ppvObject);
2848
2849     ULONG (STDMETHODCALLTYPE *AddRef)(
2850         IClassActivator* This);
2851
2852     ULONG (STDMETHODCALLTYPE *Release)(
2853         IClassActivator* This);
2854
2855     /*** IClassActivator methods ***/
2856     HRESULT (STDMETHODCALLTYPE *GetClassObject)(
2857         IClassActivator* This,
2858         REFCLSID rclsid,
2859         DWORD dwClassContext,
2860         LCID locale,
2861         REFIID riid,
2862         void** ppv);
2863
2864 };
2865
2866 /*** IUnknown methods ***/
2867 #define IClassActivator_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2868 #define IClassActivator_AddRef(p) (p)->lpVtbl->AddRef(p)
2869 #define IClassActivator_Release(p) (p)->lpVtbl->Release(p)
2870 /*** IClassActivator methods ***/
2871 #define IClassActivator_GetClassObject(p,a,b,c,d,e) (p)->lpVtbl->GetClassObject(p,a,b,c,d,e)
2872
2873 #endif
2874
2875 #define IClassActivator_METHODS \
2876     ICOM_MSVTABLE_COMPAT_FIELDS \
2877     /*** IUnknown methods ***/ \
2878     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
2879     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
2880     STDMETHOD_(ULONG,Release)(THIS) PURE; \
2881     /*** IClassActivator methods ***/ \
2882     STDMETHOD_(HRESULT,GetClassObject)(THIS_ REFCLSID rclsid, DWORD dwClassContext, LCID locale, REFIID riid, void** ppv) PURE;
2883
2884 HRESULT CALLBACK IClassActivator_GetClassObject_Proxy(
2885     IClassActivator* This,
2886     REFCLSID rclsid,
2887     DWORD dwClassContext,
2888     LCID locale,
2889     REFIID riid,
2890     void** ppv);
2891 void __RPC_STUB IClassActivator_GetClassObject_Stub(
2892     struct IRpcStubBuffer* This,
2893     struct IRpcChannelBuffer* pRpcChannelBuffer,
2894     PRPC_MESSAGE pRpcMessage,
2895     DWORD* pdwStubPhase);
2896
2897 typedef struct ISequentialStream ISequentialStream;
2898 /*****************************************************************************
2899  * ISequentialStream interface
2900  */
2901 DEFINE_GUID(IID_ISequentialStream, 0x0c733a30, 0x2a1c, 0x11ce, 0xad,0xe5, 0x00,0xaa,0x00,0x44,0x77,0x3d);
2902 #if defined(__cplusplus) && !defined(CINTERFACE)
2903 struct ISequentialStream : public IUnknown
2904 {
2905     virtual HRESULT STDMETHODCALLTYPE Read(
2906         void* pv,
2907         ULONG cb,
2908         ULONG* pcbRead) = 0;
2909
2910     virtual HRESULT STDMETHODCALLTYPE Write(
2911         const void* pv,
2912         ULONG cb,
2913         ULONG* pcbWritten) = 0;
2914
2915 };
2916 #else
2917 typedef struct ISequentialStreamVtbl ISequentialStreamVtbl;
2918 struct ISequentialStream {
2919     const ISequentialStreamVtbl* lpVtbl;
2920 };
2921 struct ISequentialStreamVtbl {
2922     ICOM_MSVTABLE_COMPAT_FIELDS
2923
2924     /*** IUnknown methods ***/
2925     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
2926         ISequentialStream* This,
2927         REFIID riid,
2928         void** ppvObject);
2929
2930     ULONG (STDMETHODCALLTYPE *AddRef)(
2931         ISequentialStream* This);
2932
2933     ULONG (STDMETHODCALLTYPE *Release)(
2934         ISequentialStream* This);
2935
2936     /*** ISequentialStream methods ***/
2937     HRESULT (STDMETHODCALLTYPE *Read)(
2938         ISequentialStream* This,
2939         void* pv,
2940         ULONG cb,
2941         ULONG* pcbRead);
2942
2943     HRESULT (STDMETHODCALLTYPE *Write)(
2944         ISequentialStream* This,
2945         const void* pv,
2946         ULONG cb,
2947         ULONG* pcbWritten);
2948
2949 };
2950
2951 /*** IUnknown methods ***/
2952 #define ISequentialStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
2953 #define ISequentialStream_AddRef(p) (p)->lpVtbl->AddRef(p)
2954 #define ISequentialStream_Release(p) (p)->lpVtbl->Release(p)
2955 /*** ISequentialStream methods ***/
2956 #define ISequentialStream_Read(p,a,b,c) (p)->lpVtbl->Read(p,a,b,c)
2957 #define ISequentialStream_Write(p,a,b,c) (p)->lpVtbl->Write(p,a,b,c)
2958
2959 #endif
2960
2961 #define ISequentialStream_METHODS \
2962     ICOM_MSVTABLE_COMPAT_FIELDS \
2963     /*** IUnknown methods ***/ \
2964     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
2965     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
2966     STDMETHOD_(ULONG,Release)(THIS) PURE; \
2967     /*** ISequentialStream methods ***/ \
2968     STDMETHOD_(HRESULT,Read)(THIS_ void* pv, ULONG cb, ULONG* pcbRead) PURE; \
2969     STDMETHOD_(HRESULT,Write)(THIS_ const void* pv, ULONG cb, ULONG* pcbWritten) PURE;
2970
2971 HRESULT CALLBACK ISequentialStream_RemoteRead_Proxy(
2972     ISequentialStream* This,
2973     byte* pv,
2974     ULONG cb,
2975     ULONG* pcbRead);
2976 void __RPC_STUB ISequentialStream_RemoteRead_Stub(
2977     struct IRpcStubBuffer* This,
2978     struct IRpcChannelBuffer* pRpcChannelBuffer,
2979     PRPC_MESSAGE pRpcMessage,
2980     DWORD* pdwStubPhase);
2981 HRESULT CALLBACK ISequentialStream_Read_Proxy(
2982     ISequentialStream* This,
2983     void* pv,
2984     ULONG cb,
2985     ULONG* pcbRead);
2986 HRESULT __RPC_STUB ISequentialStream_Read_Stub(
2987     ISequentialStream* This,
2988     byte* pv,
2989     ULONG cb,
2990     ULONG* pcbRead);
2991 HRESULT CALLBACK ISequentialStream_RemoteWrite_Proxy(
2992     ISequentialStream* This,
2993     const byte* pv,
2994     ULONG cb,
2995     ULONG* pcbWritten);
2996 void __RPC_STUB ISequentialStream_RemoteWrite_Stub(
2997     struct IRpcStubBuffer* This,
2998     struct IRpcChannelBuffer* pRpcChannelBuffer,
2999     PRPC_MESSAGE pRpcMessage,
3000     DWORD* pdwStubPhase);
3001 HRESULT CALLBACK ISequentialStream_Write_Proxy(
3002     ISequentialStream* This,
3003     const void* pv,
3004     ULONG cb,
3005     ULONG* pcbWritten);
3006 HRESULT __RPC_STUB ISequentialStream_Write_Stub(
3007     ISequentialStream* This,
3008     const byte* pv,
3009     ULONG cb,
3010     ULONG* pcbWritten);
3011
3012 typedef IStream *LPSTREAM;
3013
3014 typedef struct tagSTATSTG {
3015     LPOLESTR pwcsName;
3016     DWORD type;
3017     ULARGE_INTEGER cbSize;
3018     FILETIME mtime;
3019     FILETIME ctime;
3020     FILETIME atime;
3021     DWORD grfMode;
3022     DWORD grfLocksSupported;
3023     CLSID clsid;
3024     DWORD grfStateBits;
3025     DWORD reserved;
3026 } STATSTG;
3027
3028 typedef enum tagSTGTY {
3029     STGTY_STORAGE = 1,
3030     STGTY_STREAM = 2,
3031     STGTY_LOCKBYTES = 3,
3032     STGTY_PROPERTY = 4
3033 } STGTY;
3034
3035 typedef enum tagSTREAM_SEEK {
3036     STREAM_SEEK_SET = 0,
3037     STREAM_SEEK_CUR = 1,
3038     STREAM_SEEK_END = 2
3039 } STREAM_SEEK;
3040
3041 #undef LOCK_MAND
3042 #undef LOCK_READ
3043 #undef LOCK_WRITE
3044 #undef LOCK_RW
3045 typedef enum tagLOCKTYPE {
3046     LOCK_WRITE = 1,
3047     LOCK_EXCLUSIVE = 2,
3048     LOCK_ONLYONCE = 4
3049 } LOCKTYPE;
3050
3051 /*****************************************************************************
3052  * IStream interface
3053  */
3054 DEFINE_GUID(IID_IStream, 0x0000000c, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
3055 #if defined(__cplusplus) && !defined(CINTERFACE)
3056 struct IStream : public ISequentialStream
3057 {
3058     virtual HRESULT STDMETHODCALLTYPE Seek(
3059         LARGE_INTEGER dlibMove,
3060         DWORD dwOrigin,
3061         ULARGE_INTEGER* plibNewPosition) = 0;
3062
3063     virtual HRESULT STDMETHODCALLTYPE SetSize(
3064         ULARGE_INTEGER libNewSize) = 0;
3065
3066     virtual HRESULT STDMETHODCALLTYPE CopyTo(
3067         IStream* pstm,
3068         ULARGE_INTEGER cb,
3069         ULARGE_INTEGER* pcbRead,
3070         ULARGE_INTEGER* pcbWritten) = 0;
3071
3072     virtual HRESULT STDMETHODCALLTYPE Commit(
3073         DWORD grfCommitFlags) = 0;
3074
3075     virtual HRESULT STDMETHODCALLTYPE Revert(
3076         ) = 0;
3077
3078     virtual HRESULT STDMETHODCALLTYPE LockRegion(
3079         ULARGE_INTEGER libOffset,
3080         ULARGE_INTEGER cb,
3081         DWORD dwLockType) = 0;
3082
3083     virtual HRESULT STDMETHODCALLTYPE UnlockRegion(
3084         ULARGE_INTEGER libOffset,
3085         ULARGE_INTEGER cb,
3086         DWORD dwLockType) = 0;
3087
3088     virtual HRESULT STDMETHODCALLTYPE Stat(
3089         STATSTG* pstatstg,
3090         DWORD grfStatFlag) = 0;
3091
3092     virtual HRESULT STDMETHODCALLTYPE Clone(
3093         IStream** ppstm) = 0;
3094
3095 };
3096 #else
3097 typedef struct IStreamVtbl IStreamVtbl;
3098 struct IStream {
3099     const IStreamVtbl* lpVtbl;
3100 };
3101 struct IStreamVtbl {
3102     ICOM_MSVTABLE_COMPAT_FIELDS
3103
3104     /*** IUnknown methods ***/
3105     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
3106         IStream* This,
3107         REFIID riid,
3108         void** ppvObject);
3109
3110     ULONG (STDMETHODCALLTYPE *AddRef)(
3111         IStream* This);
3112
3113     ULONG (STDMETHODCALLTYPE *Release)(
3114         IStream* This);
3115
3116     /*** ISequentialStream methods ***/
3117     HRESULT (STDMETHODCALLTYPE *Read)(
3118         IStream* This,
3119         void* pv,
3120         ULONG cb,
3121         ULONG* pcbRead);
3122
3123     HRESULT (STDMETHODCALLTYPE *Write)(
3124         IStream* This,
3125         const void* pv,
3126         ULONG cb,
3127         ULONG* pcbWritten);
3128
3129     /*** IStream methods ***/
3130     HRESULT (STDMETHODCALLTYPE *Seek)(
3131         IStream* This,
3132         LARGE_INTEGER dlibMove,
3133         DWORD dwOrigin,
3134         ULARGE_INTEGER* plibNewPosition);
3135
3136     HRESULT (STDMETHODCALLTYPE *SetSize)(
3137         IStream* This,
3138         ULARGE_INTEGER libNewSize);
3139
3140     HRESULT (STDMETHODCALLTYPE *CopyTo)(
3141         IStream* This,
3142         IStream* pstm,
3143         ULARGE_INTEGER cb,
3144         ULARGE_INTEGER* pcbRead,
3145         ULARGE_INTEGER* pcbWritten);
3146
3147     HRESULT (STDMETHODCALLTYPE *Commit)(
3148         IStream* This,
3149         DWORD grfCommitFlags);
3150
3151     HRESULT (STDMETHODCALLTYPE *Revert)(
3152         IStream* This);
3153
3154     HRESULT (STDMETHODCALLTYPE *LockRegion)(
3155         IStream* This,
3156         ULARGE_INTEGER libOffset,
3157         ULARGE_INTEGER cb,
3158         DWORD dwLockType);
3159
3160     HRESULT (STDMETHODCALLTYPE *UnlockRegion)(
3161         IStream* This,
3162         ULARGE_INTEGER libOffset,
3163         ULARGE_INTEGER cb,
3164         DWORD dwLockType);
3165
3166     HRESULT (STDMETHODCALLTYPE *Stat)(
3167         IStream* This,
3168         STATSTG* pstatstg,
3169         DWORD grfStatFlag);
3170
3171     HRESULT (STDMETHODCALLTYPE *Clone)(
3172         IStream* This,
3173         IStream** ppstm);
3174
3175 };
3176
3177 /*** IUnknown methods ***/
3178 #define IStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
3179 #define IStream_AddRef(p) (p)->lpVtbl->AddRef(p)
3180 #define IStream_Release(p) (p)->lpVtbl->Release(p)
3181 /*** ISequentialStream methods ***/
3182 #define IStream_Read(p,a,b,c) (p)->lpVtbl->Read(p,a,b,c)
3183 #define IStream_Write(p,a,b,c) (p)->lpVtbl->Write(p,a,b,c)
3184 /*** IStream methods ***/
3185 #define IStream_Seek(p,a,b,c) (p)->lpVtbl->Seek(p,a,b,c)
3186 #define IStream_SetSize(p,a) (p)->lpVtbl->SetSize(p,a)
3187 #define IStream_CopyTo(p,a,b,c,d) (p)->lpVtbl->CopyTo(p,a,b,c,d)
3188 #define IStream_Commit(p,a) (p)->lpVtbl->Commit(p,a)
3189 #define IStream_Revert(p) (p)->lpVtbl->Revert(p)
3190 #define IStream_LockRegion(p,a,b,c) (p)->lpVtbl->LockRegion(p,a,b,c)
3191 #define IStream_UnlockRegion(p,a,b,c) (p)->lpVtbl->UnlockRegion(p,a,b,c)
3192 #define IStream_Stat(p,a,b) (p)->lpVtbl->Stat(p,a,b)
3193 #define IStream_Clone(p,a) (p)->lpVtbl->Clone(p,a)
3194
3195 #endif
3196
3197 #define IStream_METHODS \
3198     ICOM_MSVTABLE_COMPAT_FIELDS \
3199     /*** IUnknown methods ***/ \
3200     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
3201     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
3202     STDMETHOD_(ULONG,Release)(THIS) PURE; \
3203     /*** ISequentialStream methods ***/ \
3204     STDMETHOD_(HRESULT,Read)(THIS_ void* pv, ULONG cb, ULONG* pcbRead) PURE; \
3205     STDMETHOD_(HRESULT,Write)(THIS_ const void* pv, ULONG cb, ULONG* pcbWritten) PURE; \
3206     /*** IStream methods ***/ \
3207     STDMETHOD_(HRESULT,Seek)(THIS_ LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) PURE; \
3208     STDMETHOD_(HRESULT,SetSize)(THIS_ ULARGE_INTEGER libNewSize) PURE; \
3209     STDMETHOD_(HRESULT,CopyTo)(THIS_ IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) PURE; \
3210     STDMETHOD_(HRESULT,Commit)(THIS_ DWORD grfCommitFlags) PURE; \
3211     STDMETHOD_(HRESULT,Revert)(THIS) PURE; \
3212     STDMETHOD_(HRESULT,LockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; \
3213     STDMETHOD_(HRESULT,UnlockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; \
3214     STDMETHOD_(HRESULT,Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE; \
3215     STDMETHOD_(HRESULT,Clone)(THIS_ IStream** ppstm) PURE;
3216
3217 HRESULT CALLBACK IStream_RemoteSeek_Proxy(
3218     IStream* This,
3219     LARGE_INTEGER dlibMove,
3220     DWORD dwOrigin,
3221     ULARGE_INTEGER* plibNewPosition);
3222 void __RPC_STUB IStream_RemoteSeek_Stub(
3223     struct IRpcStubBuffer* This,
3224     struct IRpcChannelBuffer* pRpcChannelBuffer,
3225     PRPC_MESSAGE pRpcMessage,
3226     DWORD* pdwStubPhase);
3227 HRESULT CALLBACK IStream_Seek_Proxy(
3228     IStream* This,
3229     LARGE_INTEGER dlibMove,
3230     DWORD dwOrigin,
3231     ULARGE_INTEGER* plibNewPosition);
3232 HRESULT __RPC_STUB IStream_Seek_Stub(
3233     IStream* This,
3234     LARGE_INTEGER dlibMove,
3235     DWORD dwOrigin,
3236     ULARGE_INTEGER* plibNewPosition);
3237 HRESULT CALLBACK IStream_SetSize_Proxy(
3238     IStream* This,
3239     ULARGE_INTEGER libNewSize);
3240 void __RPC_STUB IStream_SetSize_Stub(
3241     struct IRpcStubBuffer* This,
3242     struct IRpcChannelBuffer* pRpcChannelBuffer,
3243     PRPC_MESSAGE pRpcMessage,
3244     DWORD* pdwStubPhase);
3245 HRESULT CALLBACK IStream_RemoteCopyTo_Proxy(
3246     IStream* This,
3247     IStream* pstm,
3248     ULARGE_INTEGER cb,
3249     ULARGE_INTEGER* pcbRead,
3250     ULARGE_INTEGER* pcbWritten);
3251 void __RPC_STUB IStream_RemoteCopyTo_Stub(
3252     struct IRpcStubBuffer* This,
3253     struct IRpcChannelBuffer* pRpcChannelBuffer,
3254     PRPC_MESSAGE pRpcMessage,
3255     DWORD* pdwStubPhase);
3256 HRESULT CALLBACK IStream_CopyTo_Proxy(
3257     IStream* This,
3258     IStream* pstm,
3259     ULARGE_INTEGER cb,
3260     ULARGE_INTEGER* pcbRead,
3261     ULARGE_INTEGER* pcbWritten);
3262 HRESULT __RPC_STUB IStream_CopyTo_Stub(
3263     IStream* This,
3264     IStream* pstm,
3265     ULARGE_INTEGER cb,
3266     ULARGE_INTEGER* pcbRead,
3267     ULARGE_INTEGER* pcbWritten);
3268 HRESULT CALLBACK IStream_Commit_Proxy(
3269     IStream* This,
3270     DWORD grfCommitFlags);
3271 void __RPC_STUB IStream_Commit_Stub(
3272     struct IRpcStubBuffer* This,
3273     struct IRpcChannelBuffer* pRpcChannelBuffer,
3274     PRPC_MESSAGE pRpcMessage,
3275     DWORD* pdwStubPhase);
3276 HRESULT CALLBACK IStream_Revert_Proxy(
3277     IStream* This);
3278 void __RPC_STUB IStream_Revert_Stub(
3279     struct IRpcStubBuffer* This,
3280     struct IRpcChannelBuffer* pRpcChannelBuffer,
3281     PRPC_MESSAGE pRpcMessage,
3282     DWORD* pdwStubPhase);
3283 HRESULT CALLBACK IStream_LockRegion_Proxy(
3284     IStream* This,
3285     ULARGE_INTEGER libOffset,
3286     ULARGE_INTEGER cb,
3287     DWORD dwLockType);
3288 void __RPC_STUB IStream_LockRegion_Stub(
3289     struct IRpcStubBuffer* This,
3290     struct IRpcChannelBuffer* pRpcChannelBuffer,
3291     PRPC_MESSAGE pRpcMessage,
3292     DWORD* pdwStubPhase);
3293 HRESULT CALLBACK IStream_UnlockRegion_Proxy(
3294     IStream* This,
3295     ULARGE_INTEGER libOffset,
3296     ULARGE_INTEGER cb,
3297     DWORD dwLockType);
3298 void __RPC_STUB IStream_UnlockRegion_Stub(
3299     struct IRpcStubBuffer* This,
3300     struct IRpcChannelBuffer* pRpcChannelBuffer,
3301     PRPC_MESSAGE pRpcMessage,
3302     DWORD* pdwStubPhase);
3303 HRESULT CALLBACK IStream_Stat_Proxy(
3304     IStream* This,
3305     STATSTG* pstatstg,
3306     DWORD grfStatFlag);
3307 void __RPC_STUB IStream_Stat_Stub(
3308     struct IRpcStubBuffer* This,
3309     struct IRpcChannelBuffer* pRpcChannelBuffer,
3310     PRPC_MESSAGE pRpcMessage,
3311     DWORD* pdwStubPhase);
3312 HRESULT CALLBACK IStream_Clone_Proxy(
3313     IStream* This,
3314     IStream** ppstm);
3315 void __RPC_STUB IStream_Clone_Stub(
3316     struct IRpcStubBuffer* This,
3317     struct IRpcChannelBuffer* pRpcChannelBuffer,
3318     PRPC_MESSAGE pRpcMessage,
3319     DWORD* pdwStubPhase);
3320
3321 typedef IStream16 *LPSTREAM16;
3322
3323 typedef struct tagSTATSTG16 {
3324     LPOLESTR16 pwcsName;
3325     DWORD type;
3326     ULARGE_INTEGER cbSize;
3327     FILETIME mtime;
3328     FILETIME ctime;
3329     FILETIME atime;
3330     DWORD grfMode;
3331     DWORD grfLocksSupported;
3332     CLSID clsid;
3333     DWORD grfStateBits;
3334     DWORD reserved;
3335 } STATSTG16;
3336
3337 /*****************************************************************************
3338  * IStream16 interface
3339  */
3340 #if defined(__cplusplus) && !defined(CINTERFACE)
3341 struct IStream16 : public ISequentialStream
3342 {
3343     virtual HRESULT STDMETHODCALLTYPE Seek(
3344         LARGE_INTEGER dlibMove,
3345         DWORD dwOrigin,
3346         ULARGE_INTEGER* plibNewPosition) = 0;
3347
3348     virtual HRESULT STDMETHODCALLTYPE SetSize(
3349         ULARGE_INTEGER libNewSize) = 0;
3350
3351     virtual HRESULT STDMETHODCALLTYPE CopyTo(
3352         IStream16* pstm,
3353         ULARGE_INTEGER cb,
3354         ULARGE_INTEGER* pcbRead,
3355         ULARGE_INTEGER* pcbWritten) = 0;
3356
3357     virtual HRESULT STDMETHODCALLTYPE Commit(
3358         DWORD grfCommitFlags) = 0;
3359
3360     virtual HRESULT STDMETHODCALLTYPE Revert(
3361         ) = 0;
3362
3363     virtual HRESULT STDMETHODCALLTYPE LockRegion(
3364         ULARGE_INTEGER libOffset,
3365         ULARGE_INTEGER cb,
3366         DWORD dwLockType) = 0;
3367
3368     virtual HRESULT STDMETHODCALLTYPE UnlockRegion(
3369         ULARGE_INTEGER libOffset,
3370         ULARGE_INTEGER cb,
3371         DWORD dwLockType) = 0;
3372
3373     virtual HRESULT STDMETHODCALLTYPE Stat(
3374         STATSTG* pstatstg,
3375         DWORD grfStatFlag) = 0;
3376
3377     virtual HRESULT STDMETHODCALLTYPE Clone(
3378         IStream16** ppstm) = 0;
3379
3380 };
3381 #else
3382 typedef struct IStream16Vtbl IStream16Vtbl;
3383 struct IStream16 {
3384     const IStream16Vtbl* lpVtbl;
3385 };
3386 struct IStream16Vtbl {
3387     ICOM_MSVTABLE_COMPAT_FIELDS
3388
3389     /*** IUnknown methods ***/
3390     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
3391         IStream16* This,
3392         REFIID riid,
3393         void** ppvObject);
3394
3395     ULONG (STDMETHODCALLTYPE *AddRef)(
3396         IStream16* This);
3397
3398     ULONG (STDMETHODCALLTYPE *Release)(
3399         IStream16* This);
3400
3401     /*** ISequentialStream methods ***/
3402     HRESULT (STDMETHODCALLTYPE *Read)(
3403         IStream16* This,
3404         void* pv,
3405         ULONG cb,
3406         ULONG* pcbRead);
3407
3408     HRESULT (STDMETHODCALLTYPE *Write)(
3409         IStream16* This,
3410         const void* pv,
3411         ULONG cb,
3412         ULONG* pcbWritten);
3413
3414     /*** IStream16 methods ***/
3415     HRESULT (STDMETHODCALLTYPE *Seek)(
3416         IStream16* This,
3417         LARGE_INTEGER dlibMove,
3418         DWORD dwOrigin,
3419         ULARGE_INTEGER* plibNewPosition);
3420
3421     HRESULT (STDMETHODCALLTYPE *SetSize)(
3422         IStream16* This,
3423         ULARGE_INTEGER libNewSize);
3424
3425     HRESULT (STDMETHODCALLTYPE *CopyTo)(
3426         IStream16* This,
3427         IStream16* pstm,
3428         ULARGE_INTEGER cb,
3429         ULARGE_INTEGER* pcbRead,
3430         ULARGE_INTEGER* pcbWritten);
3431
3432     HRESULT (STDMETHODCALLTYPE *Commit)(
3433         IStream16* This,
3434         DWORD grfCommitFlags);
3435
3436     HRESULT (STDMETHODCALLTYPE *Revert)(
3437         IStream16* This);
3438
3439     HRESULT (STDMETHODCALLTYPE *LockRegion)(
3440         IStream16* This,
3441         ULARGE_INTEGER libOffset,
3442         ULARGE_INTEGER cb,
3443         DWORD dwLockType);
3444
3445     HRESULT (STDMETHODCALLTYPE *UnlockRegion)(
3446         IStream16* This,
3447         ULARGE_INTEGER libOffset,
3448         ULARGE_INTEGER cb,
3449         DWORD dwLockType);
3450
3451     HRESULT (STDMETHODCALLTYPE *Stat)(
3452         IStream16* This,
3453         STATSTG* pstatstg,
3454         DWORD grfStatFlag);
3455
3456     HRESULT (STDMETHODCALLTYPE *Clone)(
3457         IStream16* This,
3458         IStream16** ppstm);
3459
3460 };
3461
3462 /*** IUnknown methods ***/
3463 #define IStream16_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
3464 #define IStream16_AddRef(p) (p)->lpVtbl->AddRef(p)
3465 #define IStream16_Release(p) (p)->lpVtbl->Release(p)
3466 /*** ISequentialStream methods ***/
3467 #define IStream16_Read(p,a,b,c) (p)->lpVtbl->Read(p,a,b,c)
3468 #define IStream16_Write(p,a,b,c) (p)->lpVtbl->Write(p,a,b,c)
3469 /*** IStream16 methods ***/
3470 #define IStream16_Seek(p,a,b,c) (p)->lpVtbl->Seek(p,a,b,c)
3471 #define IStream16_SetSize(p,a) (p)->lpVtbl->SetSize(p,a)
3472 #define IStream16_CopyTo(p,a,b,c,d) (p)->lpVtbl->CopyTo(p,a,b,c,d)
3473 #define IStream16_Commit(p,a) (p)->lpVtbl->Commit(p,a)
3474 #define IStream16_Revert(p) (p)->lpVtbl->Revert(p)
3475 #define IStream16_LockRegion(p,a,b,c) (p)->lpVtbl->LockRegion(p,a,b,c)
3476 #define IStream16_UnlockRegion(p,a,b,c) (p)->lpVtbl->UnlockRegion(p,a,b,c)
3477 #define IStream16_Stat(p,a,b) (p)->lpVtbl->Stat(p,a,b)
3478 #define IStream16_Clone(p,a) (p)->lpVtbl->Clone(p,a)
3479
3480 #endif
3481
3482 #define IStream16_METHODS \
3483     ICOM_MSVTABLE_COMPAT_FIELDS \
3484     /*** IUnknown methods ***/ \
3485     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
3486     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
3487     STDMETHOD_(ULONG,Release)(THIS) PURE; \
3488     /*** ISequentialStream methods ***/ \
3489     STDMETHOD_(HRESULT,Read)(THIS_ void* pv, ULONG cb, ULONG* pcbRead) PURE; \
3490     STDMETHOD_(HRESULT,Write)(THIS_ const void* pv, ULONG cb, ULONG* pcbWritten) PURE; \
3491     /*** IStream16 methods ***/ \
3492     STDMETHOD_(HRESULT,Seek)(THIS_ LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) PURE; \
3493     STDMETHOD_(HRESULT,SetSize)(THIS_ ULARGE_INTEGER libNewSize) PURE; \
3494     STDMETHOD_(HRESULT,CopyTo)(THIS_ IStream16* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) PURE; \
3495     STDMETHOD_(HRESULT,Commit)(THIS_ DWORD grfCommitFlags) PURE; \
3496     STDMETHOD_(HRESULT,Revert)(THIS) PURE; \
3497     STDMETHOD_(HRESULT,LockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; \
3498     STDMETHOD_(HRESULT,UnlockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; \
3499     STDMETHOD_(HRESULT,Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE; \
3500     STDMETHOD_(HRESULT,Clone)(THIS_ IStream16** ppstm) PURE;
3501
3502 HRESULT CALLBACK IStream16_RemoteSeek_Proxy(
3503     IStream16* This,
3504     LARGE_INTEGER dlibMove,
3505     DWORD dwOrigin,
3506     ULARGE_INTEGER* plibNewPosition);
3507 void __RPC_STUB IStream16_RemoteSeek_Stub(
3508     struct IRpcStubBuffer* This,
3509     struct IRpcChannelBuffer* pRpcChannelBuffer,
3510     PRPC_MESSAGE pRpcMessage,
3511     DWORD* pdwStubPhase);
3512 HRESULT CALLBACK IStream16_Seek_Proxy(
3513     IStream16* This,
3514     LARGE_INTEGER dlibMove,
3515     DWORD dwOrigin,
3516     ULARGE_INTEGER* plibNewPosition);
3517 HRESULT __RPC_STUB IStream16_Seek_Stub(
3518     IStream16* This,
3519     LARGE_INTEGER dlibMove,
3520     DWORD dwOrigin,
3521     ULARGE_INTEGER* plibNewPosition);
3522 HRESULT CALLBACK IStream16_SetSize_Proxy(
3523     IStream16* This,
3524     ULARGE_INTEGER libNewSize);
3525 void __RPC_STUB IStream16_SetSize_Stub(
3526     struct IRpcStubBuffer* This,
3527     struct IRpcChannelBuffer* pRpcChannelBuffer,
3528     PRPC_MESSAGE pRpcMessage,
3529     DWORD* pdwStubPhase);
3530 HRESULT CALLBACK IStream16_RemoteCopyTo_Proxy(
3531     IStream16* This,
3532     IStream16* pstm,
3533     ULARGE_INTEGER cb,
3534     ULARGE_INTEGER* pcbRead,
3535     ULARGE_INTEGER* pcbWritten);
3536 void __RPC_STUB IStream16_RemoteCopyTo_Stub(
3537     struct IRpcStubBuffer* This,
3538     struct IRpcChannelBuffer* pRpcChannelBuffer,
3539     PRPC_MESSAGE pRpcMessage,
3540     DWORD* pdwStubPhase);
3541 HRESULT CALLBACK IStream16_CopyTo_Proxy(
3542     IStream16* This,
3543     IStream16* pstm,
3544     ULARGE_INTEGER cb,
3545     ULARGE_INTEGER* pcbRead,
3546     ULARGE_INTEGER* pcbWritten);
3547 HRESULT __RPC_STUB IStream16_CopyTo_Stub(
3548     IStream16* This,
3549     IStream16* pstm,
3550     ULARGE_INTEGER cb,
3551     ULARGE_INTEGER* pcbRead,
3552     ULARGE_INTEGER* pcbWritten);
3553 HRESULT CALLBACK IStream16_Commit_Proxy(
3554     IStream16* This,
3555     DWORD grfCommitFlags);
3556 void __RPC_STUB IStream16_Commit_Stub(
3557     struct IRpcStubBuffer* This,
3558     struct IRpcChannelBuffer* pRpcChannelBuffer,
3559     PRPC_MESSAGE pRpcMessage,
3560     DWORD* pdwStubPhase);
3561 HRESULT CALLBACK IStream16_Revert_Proxy(
3562     IStream16* This);
3563 void __RPC_STUB IStream16_Revert_Stub(
3564     struct IRpcStubBuffer* This,
3565     struct IRpcChannelBuffer* pRpcChannelBuffer,
3566     PRPC_MESSAGE pRpcMessage,
3567     DWORD* pdwStubPhase);
3568 HRESULT CALLBACK IStream16_LockRegion_Proxy(
3569     IStream16* This,
3570     ULARGE_INTEGER libOffset,
3571     ULARGE_INTEGER cb,
3572     DWORD dwLockType);
3573 void __RPC_STUB IStream16_LockRegion_Stub(
3574     struct IRpcStubBuffer* This,
3575     struct IRpcChannelBuffer* pRpcChannelBuffer,
3576     PRPC_MESSAGE pRpcMessage,
3577     DWORD* pdwStubPhase);
3578 HRESULT CALLBACK IStream16_UnlockRegion_Proxy(
3579     IStream16* This,
3580     ULARGE_INTEGER libOffset,
3581     ULARGE_INTEGER cb,
3582     DWORD dwLockType);
3583 void __RPC_STUB IStream16_UnlockRegion_Stub(
3584     struct IRpcStubBuffer* This,
3585     struct IRpcChannelBuffer* pRpcChannelBuffer,
3586     PRPC_MESSAGE pRpcMessage,
3587     DWORD* pdwStubPhase);
3588 HRESULT CALLBACK IStream16_Stat_Proxy(
3589     IStream16* This,
3590     STATSTG* pstatstg,
3591     DWORD grfStatFlag);
3592 void __RPC_STUB IStream16_Stat_Stub(
3593     struct IRpcStubBuffer* This,
3594     struct IRpcChannelBuffer* pRpcChannelBuffer,
3595     PRPC_MESSAGE pRpcMessage,
3596     DWORD* pdwStubPhase);
3597 HRESULT CALLBACK IStream16_Clone_Proxy(
3598     IStream16* This,
3599     IStream16** ppstm);
3600 void __RPC_STUB IStream16_Clone_Stub(
3601     struct IRpcStubBuffer* This,
3602     struct IRpcChannelBuffer* pRpcChannelBuffer,
3603     PRPC_MESSAGE pRpcMessage,
3604     DWORD* pdwStubPhase);
3605
3606 typedef struct IEnumSTATSTG IEnumSTATSTG;
3607 typedef IEnumSTATSTG *LPENUMSTATSTG;
3608
3609 /*****************************************************************************
3610  * IEnumSTATSTG interface
3611  */
3612 DEFINE_GUID(IID_IEnumSTATSTG, 0x0000000d, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
3613 #if defined(__cplusplus) && !defined(CINTERFACE)
3614 struct IEnumSTATSTG : public IUnknown
3615 {
3616     virtual HRESULT STDMETHODCALLTYPE Next(
3617         ULONG celt,
3618         STATSTG* rgelt,
3619         ULONG* pceltFetched) = 0;
3620
3621     virtual HRESULT STDMETHODCALLTYPE Skip(
3622         ULONG celt) = 0;
3623
3624     virtual HRESULT STDMETHODCALLTYPE Reset(
3625         ) = 0;
3626
3627     virtual HRESULT STDMETHODCALLTYPE Clone(
3628         IEnumSTATSTG** ppenum) = 0;
3629
3630 };
3631 #else
3632 typedef struct IEnumSTATSTGVtbl IEnumSTATSTGVtbl;
3633 struct IEnumSTATSTG {
3634     const IEnumSTATSTGVtbl* lpVtbl;
3635 };
3636 struct IEnumSTATSTGVtbl {
3637     ICOM_MSVTABLE_COMPAT_FIELDS
3638
3639     /*** IUnknown methods ***/
3640     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
3641         IEnumSTATSTG* This,
3642         REFIID riid,
3643         void** ppvObject);
3644
3645     ULONG (STDMETHODCALLTYPE *AddRef)(
3646         IEnumSTATSTG* This);
3647
3648     ULONG (STDMETHODCALLTYPE *Release)(
3649         IEnumSTATSTG* This);
3650
3651     /*** IEnumSTATSTG methods ***/
3652     HRESULT (STDMETHODCALLTYPE *Next)(
3653         IEnumSTATSTG* This,
3654         ULONG celt,
3655         STATSTG* rgelt,
3656         ULONG* pceltFetched);
3657
3658     HRESULT (STDMETHODCALLTYPE *Skip)(
3659         IEnumSTATSTG* This,
3660         ULONG celt);
3661
3662     HRESULT (STDMETHODCALLTYPE *Reset)(
3663         IEnumSTATSTG* This);
3664
3665     HRESULT (STDMETHODCALLTYPE *Clone)(
3666         IEnumSTATSTG* This,
3667         IEnumSTATSTG** ppenum);
3668
3669 };
3670
3671 /*** IUnknown methods ***/
3672 #define IEnumSTATSTG_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
3673 #define IEnumSTATSTG_AddRef(p) (p)->lpVtbl->AddRef(p)
3674 #define IEnumSTATSTG_Release(p) (p)->lpVtbl->Release(p)
3675 /*** IEnumSTATSTG methods ***/
3676 #define IEnumSTATSTG_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
3677 #define IEnumSTATSTG_Skip(p,a) (p)->lpVtbl->Skip(p,a)
3678 #define IEnumSTATSTG_Reset(p) (p)->lpVtbl->Reset(p)
3679 #define IEnumSTATSTG_Clone(p,a) (p)->lpVtbl->Clone(p,a)
3680
3681 #endif
3682
3683 #define IEnumSTATSTG_METHODS \
3684     ICOM_MSVTABLE_COMPAT_FIELDS \
3685     /*** IUnknown methods ***/ \
3686     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
3687     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
3688     STDMETHOD_(ULONG,Release)(THIS) PURE; \
3689     /*** IEnumSTATSTG methods ***/ \
3690     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, STATSTG* rgelt, ULONG* pceltFetched) PURE; \
3691     STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
3692     STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
3693     STDMETHOD_(HRESULT,Clone)(THIS_ IEnumSTATSTG** ppenum) PURE;
3694
3695 HRESULT CALLBACK IEnumSTATSTG_RemoteNext_Proxy(
3696     IEnumSTATSTG* This,
3697     ULONG celt,
3698     STATSTG* rgelt,
3699     ULONG* pceltFetched);
3700 void __RPC_STUB IEnumSTATSTG_RemoteNext_Stub(
3701     struct IRpcStubBuffer* This,
3702     struct IRpcChannelBuffer* pRpcChannelBuffer,
3703     PRPC_MESSAGE pRpcMessage,
3704     DWORD* pdwStubPhase);
3705 HRESULT CALLBACK IEnumSTATSTG_Next_Proxy(
3706     IEnumSTATSTG* This,
3707     ULONG celt,
3708     STATSTG* rgelt,
3709     ULONG* pceltFetched);
3710 HRESULT __RPC_STUB IEnumSTATSTG_Next_Stub(
3711     IEnumSTATSTG* This,
3712     ULONG celt,
3713     STATSTG* rgelt,
3714     ULONG* pceltFetched);
3715 HRESULT CALLBACK IEnumSTATSTG_Skip_Proxy(
3716     IEnumSTATSTG* This,
3717     ULONG celt);
3718 void __RPC_STUB IEnumSTATSTG_Skip_Stub(
3719     struct IRpcStubBuffer* This,
3720     struct IRpcChannelBuffer* pRpcChannelBuffer,
3721     PRPC_MESSAGE pRpcMessage,
3722     DWORD* pdwStubPhase);
3723 HRESULT CALLBACK IEnumSTATSTG_Reset_Proxy(
3724     IEnumSTATSTG* This);
3725 void __RPC_STUB IEnumSTATSTG_Reset_Stub(
3726     struct IRpcStubBuffer* This,
3727     struct IRpcChannelBuffer* pRpcChannelBuffer,
3728     PRPC_MESSAGE pRpcMessage,
3729     DWORD* pdwStubPhase);
3730 HRESULT CALLBACK IEnumSTATSTG_Clone_Proxy(
3731     IEnumSTATSTG* This,
3732     IEnumSTATSTG** ppenum);
3733 void __RPC_STUB IEnumSTATSTG_Clone_Stub(
3734     struct IRpcStubBuffer* This,
3735     struct IRpcChannelBuffer* pRpcChannelBuffer,
3736     PRPC_MESSAGE pRpcMessage,
3737     DWORD* pdwStubPhase);
3738
3739 typedef struct IStorage IStorage;
3740 typedef IStorage *LPSTORAGE;
3741
3742 typedef struct tagRemSNB {
3743     unsigned long ulCntStr;
3744     unsigned long ulCntChar;
3745     OLECHAR rgString[1];
3746 } RemSNB;
3747
3748 typedef RemSNB *wireSNB;
3749
3750 typedef OLECHAR **SNB;
3751 unsigned long   __RPC_USER SNB_UserSize     (unsigned long *, unsigned long,   SNB *);
3752 unsigned char * __RPC_USER SNB_UserMarshal  (unsigned long *, unsigned char *, SNB *);
3753 unsigned char * __RPC_USER SNB_UserUnmarshal(unsigned long *, unsigned char *, SNB *);
3754 void            __RPC_USER SNB_UserFree     (unsigned long *, SNB *);
3755
3756 /*****************************************************************************
3757  * IStorage interface
3758  */
3759 DEFINE_GUID(IID_IStorage, 0x0000000b, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
3760 #if defined(__cplusplus) && !defined(CINTERFACE)
3761 struct IStorage : public IUnknown
3762 {
3763     virtual HRESULT STDMETHODCALLTYPE CreateStream(
3764         LPCOLESTR pwcsName,
3765         DWORD grfMode,
3766         DWORD reserved1,
3767         DWORD reserved2,
3768         IStream** ppstm) = 0;
3769
3770     virtual HRESULT STDMETHODCALLTYPE OpenStream(
3771         LPCOLESTR pwcsName,
3772         void* reserved1,
3773         DWORD grfMode,
3774         DWORD reserved2,
3775         IStream** ppstm) = 0;
3776
3777     virtual HRESULT STDMETHODCALLTYPE CreateStorage(
3778         LPCOLESTR pwcsName,
3779         DWORD grfMode,
3780         DWORD dwStgFmt,
3781         DWORD reserved2,
3782         IStorage** ppstg) = 0;
3783
3784     virtual HRESULT STDMETHODCALLTYPE OpenStorage(
3785         LPCOLESTR pwcsName,
3786         IStorage* pstgPriority,
3787         DWORD grfMode,
3788         SNB snbExclude,
3789         DWORD reserved,
3790         IStorage** ppstg) = 0;
3791
3792     virtual HRESULT STDMETHODCALLTYPE CopyTo(
3793         DWORD ciidExclude,
3794         const IID* rgiidExclude,
3795         SNB snbExclude,
3796         IStorage* pstgDest) = 0;
3797
3798     virtual HRESULT STDMETHODCALLTYPE MoveElementTo(
3799         LPCOLESTR pwcsName,
3800         IStorage* pstgDest,
3801         LPCOLESTR pwcsNewName,
3802         DWORD grfFlags) = 0;
3803
3804     virtual HRESULT STDMETHODCALLTYPE Commit(
3805         DWORD grfCommitFlags) = 0;
3806
3807     virtual HRESULT STDMETHODCALLTYPE Revert(
3808         ) = 0;
3809
3810     virtual HRESULT STDMETHODCALLTYPE EnumElements(
3811         DWORD reserved1,
3812         void* reserved2,
3813         DWORD reserved3,
3814         IEnumSTATSTG** ppenum) = 0;
3815
3816     virtual HRESULT STDMETHODCALLTYPE DestroyElement(
3817         LPCOLESTR pwcsName) = 0;
3818
3819     virtual HRESULT STDMETHODCALLTYPE RenameElement(
3820         LPCOLESTR pwcsOldName,
3821         LPCOLESTR pwcsNewName) = 0;
3822
3823     virtual HRESULT STDMETHODCALLTYPE SetElementTimes(
3824         LPCOLESTR pwcsName,
3825         const FILETIME* pctime,
3826         const FILETIME* patime,
3827         const FILETIME* pmtime) = 0;
3828
3829     virtual HRESULT STDMETHODCALLTYPE SetClass(
3830         REFCLSID clsid) = 0;
3831
3832     virtual HRESULT STDMETHODCALLTYPE SetStateBits(
3833         DWORD grfStateBits,
3834         DWORD grfMask) = 0;
3835
3836     virtual HRESULT STDMETHODCALLTYPE Stat(
3837         STATSTG* pstatstg,
3838         DWORD grfStatFlag) = 0;
3839
3840 };
3841 #else
3842 typedef struct IStorageVtbl IStorageVtbl;
3843 struct IStorage {
3844     const IStorageVtbl* lpVtbl;
3845 };
3846 struct IStorageVtbl {
3847     ICOM_MSVTABLE_COMPAT_FIELDS
3848
3849     /*** IUnknown methods ***/
3850     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
3851         IStorage* This,
3852         REFIID riid,
3853         void** ppvObject);
3854
3855     ULONG (STDMETHODCALLTYPE *AddRef)(
3856         IStorage* This);
3857
3858     ULONG (STDMETHODCALLTYPE *Release)(
3859         IStorage* This);
3860
3861     /*** IStorage methods ***/
3862     HRESULT (STDMETHODCALLTYPE *CreateStream)(
3863         IStorage* This,
3864         LPCOLESTR pwcsName,
3865         DWORD grfMode,
3866         DWORD reserved1,
3867         DWORD reserved2,
3868         IStream** ppstm);
3869
3870     HRESULT (STDMETHODCALLTYPE *OpenStream)(
3871         IStorage* This,
3872         LPCOLESTR pwcsName,
3873         void* reserved1,
3874         DWORD grfMode,
3875         DWORD reserved2,
3876         IStream** ppstm);
3877
3878     HRESULT (STDMETHODCALLTYPE *CreateStorage)(
3879         IStorage* This,
3880         LPCOLESTR pwcsName,
3881         DWORD grfMode,
3882         DWORD dwStgFmt,
3883         DWORD reserved2,
3884         IStorage** ppstg);
3885
3886     HRESULT (STDMETHODCALLTYPE *OpenStorage)(
3887         IStorage* This,
3888         LPCOLESTR pwcsName,
3889         IStorage* pstgPriority,
3890         DWORD grfMode,
3891         SNB snbExclude,
3892         DWORD reserved,
3893         IStorage** ppstg);
3894
3895     HRESULT (STDMETHODCALLTYPE *CopyTo)(
3896         IStorage* This,
3897         DWORD ciidExclude,
3898         const IID* rgiidExclude,
3899         SNB snbExclude,
3900         IStorage* pstgDest);
3901
3902     HRESULT (STDMETHODCALLTYPE *MoveElementTo)(
3903         IStorage* This,
3904         LPCOLESTR pwcsName,
3905         IStorage* pstgDest,
3906         LPCOLESTR pwcsNewName,
3907         DWORD grfFlags);
3908
3909     HRESULT (STDMETHODCALLTYPE *Commit)(
3910         IStorage* This,
3911         DWORD grfCommitFlags);
3912
3913     HRESULT (STDMETHODCALLTYPE *Revert)(
3914         IStorage* This);
3915
3916     HRESULT (STDMETHODCALLTYPE *EnumElements)(
3917         IStorage* This,
3918         DWORD reserved1,
3919         void* reserved2,
3920         DWORD reserved3,
3921         IEnumSTATSTG** ppenum);
3922
3923     HRESULT (STDMETHODCALLTYPE *DestroyElement)(
3924         IStorage* This,
3925         LPCOLESTR pwcsName);
3926
3927     HRESULT (STDMETHODCALLTYPE *RenameElement)(
3928         IStorage* This,
3929         LPCOLESTR pwcsOldName,
3930         LPCOLESTR pwcsNewName);
3931
3932     HRESULT (STDMETHODCALLTYPE *SetElementTimes)(
3933         IStorage* This,
3934         LPCOLESTR pwcsName,
3935         const FILETIME* pctime,
3936         const FILETIME* patime,
3937         const FILETIME* pmtime);
3938
3939     HRESULT (STDMETHODCALLTYPE *SetClass)(
3940         IStorage* This,
3941         REFCLSID clsid);
3942
3943     HRESULT (STDMETHODCALLTYPE *SetStateBits)(
3944         IStorage* This,
3945         DWORD grfStateBits,
3946         DWORD grfMask);
3947
3948     HRESULT (STDMETHODCALLTYPE *Stat)(
3949         IStorage* This,
3950         STATSTG* pstatstg,
3951         DWORD grfStatFlag);
3952
3953 };
3954
3955 /*** IUnknown methods ***/
3956 #define IStorage_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
3957 #define IStorage_AddRef(p) (p)->lpVtbl->AddRef(p)
3958 #define IStorage_Release(p) (p)->lpVtbl->Release(p)
3959 /*** IStorage methods ***/
3960 #define IStorage_CreateStream(p,a,b,c,d,e) (p)->lpVtbl->CreateStream(p,a,b,c,d,e)
3961 #define IStorage_OpenStream(p,a,b,c,d,e) (p)->lpVtbl->OpenStream(p,a,b,c,d,e)
3962 #define IStorage_CreateStorage(p,a,b,c,d,e) (p)->lpVtbl->CreateStorage(p,a,b,c,d,e)
3963 #define IStorage_OpenStorage(p,a,b,c,d,e,f) (p)->lpVtbl->OpenStorage(p,a,b,c,d,e,f)
3964 #define IStorage_CopyTo(p,a,b,c,d) (p)->lpVtbl->CopyTo(p,a,b,c,d)
3965 #define IStorage_MoveElementTo(p,a,b,c,d) (p)->lpVtbl->MoveElementTo(p,a,b,c,d)
3966 #define IStorage_Commit(p,a) (p)->lpVtbl->Commit(p,a)
3967 #define IStorage_Revert(p) (p)->lpVtbl->Revert(p)
3968 #define IStorage_EnumElements(p,a,b,c,d) (p)->lpVtbl->EnumElements(p,a,b,c,d)
3969 #define IStorage_DestroyElement(p,a) (p)->lpVtbl->DestroyElement(p,a)
3970 #define IStorage_RenameElement(p,a,b) (p)->lpVtbl->RenameElement(p,a,b)
3971 #define IStorage_SetElementTimes(p,a,b,c,d) (p)->lpVtbl->SetElementTimes(p,a,b,c,d)
3972 #define IStorage_SetClass(p,a) (p)->lpVtbl->SetClass(p,a)
3973 #define IStorage_SetStateBits(p,a,b) (p)->lpVtbl->SetStateBits(p,a,b)
3974 #define IStorage_Stat(p,a,b) (p)->lpVtbl->Stat(p,a,b)
3975
3976 #endif
3977
3978 #define IStorage_METHODS \
3979     ICOM_MSVTABLE_COMPAT_FIELDS \
3980     /*** IUnknown methods ***/ \
3981     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
3982     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
3983     STDMETHOD_(ULONG,Release)(THIS) PURE; \
3984     /*** IStorage methods ***/ \
3985     STDMETHOD_(HRESULT,CreateStream)(THIS_ LPCOLESTR pwcsName, DWORD grfMode, DWORD reserved1, DWORD reserved2, IStream** ppstm) PURE; \
3986     STDMETHOD_(HRESULT,OpenStream)(THIS_ LPCOLESTR pwcsName, void* reserved1, DWORD grfMode, DWORD reserved2, IStream** ppstm) PURE; \
3987     STDMETHOD_(HRESULT,CreateStorage)(THIS_ LPCOLESTR pwcsName, DWORD grfMode, DWORD dwStgFmt, DWORD reserved2, IStorage** ppstg) PURE; \
3988     STDMETHOD_(HRESULT,OpenStorage)(THIS_ LPCOLESTR pwcsName, IStorage* pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage** ppstg) PURE; \
3989     STDMETHOD_(HRESULT,CopyTo)(THIS_ DWORD ciidExclude, const IID* rgiidExclude, SNB snbExclude, IStorage* pstgDest) PURE; \
3990     STDMETHOD_(HRESULT,MoveElementTo)(THIS_ LPCOLESTR pwcsName, IStorage* pstgDest, LPCOLESTR pwcsNewName, DWORD grfFlags) PURE; \
3991     STDMETHOD_(HRESULT,Commit)(THIS_ DWORD grfCommitFlags) PURE; \
3992     STDMETHOD_(HRESULT,Revert)(THIS) PURE; \
3993     STDMETHOD_(HRESULT,EnumElements)(THIS_ DWORD reserved1, void* reserved2, DWORD reserved3, IEnumSTATSTG** ppenum) PURE; \
3994     STDMETHOD_(HRESULT,DestroyElement)(THIS_ LPCOLESTR pwcsName) PURE; \
3995     STDMETHOD_(HRESULT,RenameElement)(THIS_ LPCOLESTR pwcsOldName, LPCOLESTR pwcsNewName) PURE; \
3996     STDMETHOD_(HRESULT,SetElementTimes)(THIS_ LPCOLESTR pwcsName, const FILETIME* pctime, const FILETIME* patime, const FILETIME* pmtime) PURE; \
3997     STDMETHOD_(HRESULT,SetClass)(THIS_ REFCLSID clsid) PURE; \
3998     STDMETHOD_(HRESULT,SetStateBits)(THIS_ DWORD grfStateBits, DWORD grfMask) PURE; \
3999     STDMETHOD_(HRESULT,Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE;
4000
4001 HRESULT CALLBACK IStorage_CreateStream_Proxy(
4002     IStorage* This,
4003     LPCOLESTR pwcsName,
4004     DWORD grfMode,
4005     DWORD reserved1,
4006     DWORD reserved2,
4007     IStream** ppstm);
4008 void __RPC_STUB IStorage_CreateStream_Stub(
4009     struct IRpcStubBuffer* This,
4010     struct IRpcChannelBuffer* pRpcChannelBuffer,
4011     PRPC_MESSAGE pRpcMessage,
4012     DWORD* pdwStubPhase);
4013 HRESULT CALLBACK IStorage_RemoteOpenStream_Proxy(
4014     IStorage* This,
4015     LPCOLESTR pwcsName,
4016     unsigned long cbReserved1,
4017     byte* reserved1,
4018     DWORD grfMode,
4019     DWORD reserved2,
4020     IStream** ppstm);
4021 void __RPC_STUB IStorage_RemoteOpenStream_Stub(
4022     struct IRpcStubBuffer* This,
4023     struct IRpcChannelBuffer* pRpcChannelBuffer,
4024     PRPC_MESSAGE pRpcMessage,
4025     DWORD* pdwStubPhase);
4026 HRESULT CALLBACK IStorage_OpenStream_Proxy(
4027     IStorage* This,
4028     LPCOLESTR pwcsName,
4029     void* reserved1,
4030     DWORD grfMode,
4031     DWORD reserved2,
4032     IStream** ppstm);
4033 HRESULT __RPC_STUB IStorage_OpenStream_Stub(
4034     IStorage* This,
4035     LPCOLESTR pwcsName,
4036     unsigned long cbReserved1,
4037     byte* reserved1,
4038     DWORD grfMode,
4039     DWORD reserved2,
4040     IStream** ppstm);
4041 HRESULT CALLBACK IStorage_CreateStorage_Proxy(
4042     IStorage* This,
4043     LPCOLESTR pwcsName,
4044     DWORD grfMode,
4045     DWORD dwStgFmt,
4046     DWORD reserved2,
4047     IStorage** ppstg);
4048 void __RPC_STUB IStorage_CreateStorage_Stub(
4049     struct IRpcStubBuffer* This,
4050     struct IRpcChannelBuffer* pRpcChannelBuffer,
4051     PRPC_MESSAGE pRpcMessage,
4052     DWORD* pdwStubPhase);
4053 HRESULT CALLBACK IStorage_OpenStorage_Proxy(
4054     IStorage* This,
4055     LPCOLESTR pwcsName,
4056     IStorage* pstgPriority,
4057     DWORD grfMode,
4058     SNB snbExclude,
4059     DWORD reserved,
4060     IStorage** ppstg);
4061 void __RPC_STUB IStorage_OpenStorage_Stub(
4062     struct IRpcStubBuffer* This,
4063     struct IRpcChannelBuffer* pRpcChannelBuffer,
4064     PRPC_MESSAGE pRpcMessage,
4065     DWORD* pdwStubPhase);
4066 HRESULT CALLBACK IStorage_CopyTo_Proxy(
4067     IStorage* This,
4068     DWORD ciidExclude,
4069     const IID* rgiidExclude,
4070     SNB snbExclude,
4071     IStorage* pstgDest);
4072 void __RPC_STUB IStorage_CopyTo_Stub(
4073     struct IRpcStubBuffer* This,
4074     struct IRpcChannelBuffer* pRpcChannelBuffer,
4075     PRPC_MESSAGE pRpcMessage,
4076     DWORD* pdwStubPhase);
4077 HRESULT CALLBACK IStorage_MoveElementTo_Proxy(
4078     IStorage* This,
4079     LPCOLESTR pwcsName,
4080     IStorage* pstgDest,
4081     LPCOLESTR pwcsNewName,
4082     DWORD grfFlags);
4083 void __RPC_STUB IStorage_MoveElementTo_Stub(
4084     struct IRpcStubBuffer* This,
4085     struct IRpcChannelBuffer* pRpcChannelBuffer,
4086     PRPC_MESSAGE pRpcMessage,
4087     DWORD* pdwStubPhase);
4088 HRESULT CALLBACK IStorage_Commit_Proxy(
4089     IStorage* This,
4090     DWORD grfCommitFlags);
4091 void __RPC_STUB IStorage_Commit_Stub(
4092     struct IRpcStubBuffer* This,
4093     struct IRpcChannelBuffer* pRpcChannelBuffer,
4094     PRPC_MESSAGE pRpcMessage,
4095     DWORD* pdwStubPhase);
4096 HRESULT CALLBACK IStorage_Revert_Proxy(
4097     IStorage* This);
4098 void __RPC_STUB IStorage_Revert_Stub(
4099     struct IRpcStubBuffer* This,
4100     struct IRpcChannelBuffer* pRpcChannelBuffer,
4101     PRPC_MESSAGE pRpcMessage,
4102     DWORD* pdwStubPhase);
4103 HRESULT CALLBACK IStorage_RemoteEnumElements_Proxy(
4104     IStorage* This,
4105     DWORD reserved1,
4106     unsigned long cbReserved2,
4107     byte* reserved2,
4108     DWORD reserved3,
4109     IEnumSTATSTG** ppenum);
4110 void __RPC_STUB IStorage_RemoteEnumElements_Stub(
4111     struct IRpcStubBuffer* This,
4112     struct IRpcChannelBuffer* pRpcChannelBuffer,
4113     PRPC_MESSAGE pRpcMessage,
4114     DWORD* pdwStubPhase);
4115 HRESULT CALLBACK IStorage_EnumElements_Proxy(
4116     IStorage* This,
4117     DWORD reserved1,
4118     void* reserved2,
4119     DWORD reserved3,
4120     IEnumSTATSTG** ppenum);
4121 HRESULT __RPC_STUB IStorage_EnumElements_Stub(
4122     IStorage* This,
4123     DWORD reserved1,
4124     unsigned long cbReserved2,
4125     byte* reserved2,
4126     DWORD reserved3,
4127     IEnumSTATSTG** ppenum);
4128 HRESULT CALLBACK IStorage_DestroyElement_Proxy(
4129     IStorage* This,
4130     LPCOLESTR pwcsName);
4131 void __RPC_STUB IStorage_DestroyElement_Stub(
4132     struct IRpcStubBuffer* This,
4133     struct IRpcChannelBuffer* pRpcChannelBuffer,
4134     PRPC_MESSAGE pRpcMessage,
4135     DWORD* pdwStubPhase);
4136 HRESULT CALLBACK IStorage_RenameElement_Proxy(
4137     IStorage* This,
4138     LPCOLESTR pwcsOldName,
4139     LPCOLESTR pwcsNewName);
4140 void __RPC_STUB IStorage_RenameElement_Stub(
4141     struct IRpcStubBuffer* This,
4142     struct IRpcChannelBuffer* pRpcChannelBuffer,
4143     PRPC_MESSAGE pRpcMessage,
4144     DWORD* pdwStubPhase);
4145 HRESULT CALLBACK IStorage_SetElementTimes_Proxy(
4146     IStorage* This,
4147     LPCOLESTR pwcsName,
4148     const FILETIME* pctime,
4149     const FILETIME* patime,
4150     const FILETIME* pmtime);
4151 void __RPC_STUB IStorage_SetElementTimes_Stub(
4152     struct IRpcStubBuffer* This,
4153     struct IRpcChannelBuffer* pRpcChannelBuffer,
4154     PRPC_MESSAGE pRpcMessage,
4155     DWORD* pdwStubPhase);
4156 HRESULT CALLBACK IStorage_SetClass_Proxy(
4157     IStorage* This,
4158     REFCLSID clsid);
4159 void __RPC_STUB IStorage_SetClass_Stub(
4160     struct IRpcStubBuffer* This,
4161     struct IRpcChannelBuffer* pRpcChannelBuffer,
4162     PRPC_MESSAGE pRpcMessage,
4163     DWORD* pdwStubPhase);
4164 HRESULT CALLBACK IStorage_SetStateBits_Proxy(
4165     IStorage* This,
4166     DWORD grfStateBits,
4167     DWORD grfMask);
4168 void __RPC_STUB IStorage_SetStateBits_Stub(
4169     struct IRpcStubBuffer* This,
4170     struct IRpcChannelBuffer* pRpcChannelBuffer,
4171     PRPC_MESSAGE pRpcMessage,
4172     DWORD* pdwStubPhase);
4173 HRESULT CALLBACK IStorage_Stat_Proxy(
4174     IStorage* This,
4175     STATSTG* pstatstg,
4176     DWORD grfStatFlag);
4177 void __RPC_STUB IStorage_Stat_Stub(
4178     struct IRpcStubBuffer* This,
4179     struct IRpcChannelBuffer* pRpcChannelBuffer,
4180     PRPC_MESSAGE pRpcMessage,
4181     DWORD* pdwStubPhase);
4182
4183 typedef struct IStorage16 IStorage16;
4184 typedef IStorage16 *LPSTORAGE16;
4185
4186 typedef struct tagRemSNB16 {
4187     unsigned long ulCntStr;
4188     unsigned long ulCntChar;
4189     OLECHAR16 rgString[1];
4190 } RemSNB16;
4191
4192 typedef RemSNB16 *wireSNB16;
4193
4194 typedef OLECHAR16 **SNB16;
4195 unsigned long   __RPC_USER SNB16_UserSize     (unsigned long *, unsigned long,   SNB16 *);
4196 unsigned char * __RPC_USER SNB16_UserMarshal  (unsigned long *, unsigned char *, SNB16 *);
4197 unsigned char * __RPC_USER SNB16_UserUnmarshal(unsigned long *, unsigned char *, SNB16 *);
4198 void            __RPC_USER SNB16_UserFree     (unsigned long *, SNB16 *);
4199
4200 /*****************************************************************************
4201  * IStorage16 interface
4202  */
4203 #if defined(__cplusplus) && !defined(CINTERFACE)
4204 struct IStorage16 : public IUnknown
4205 {
4206     virtual HRESULT STDMETHODCALLTYPE CreateStream(
4207         LPCOLESTR16 pwcsName,
4208         DWORD grfMode,
4209         DWORD reserved1,
4210         DWORD reserved2,
4211         IStream16** ppstm) = 0;
4212
4213     virtual HRESULT STDMETHODCALLTYPE OpenStream(
4214         LPCOLESTR16 pwcsName,
4215         void* reserved1,
4216         DWORD grfMode,
4217         DWORD reserved2,
4218         IStream16** ppstm) = 0;
4219
4220     virtual HRESULT STDMETHODCALLTYPE CreateStorage(
4221         LPCOLESTR16 pwcsName,
4222         DWORD grfMode,
4223         DWORD dwStgFmt,
4224         DWORD reserved2,
4225         IStorage16** ppstg) = 0;
4226
4227     virtual HRESULT STDMETHODCALLTYPE OpenStorage(
4228         LPCOLESTR16 pwcsName,
4229         IStorage16* pstgPriority,
4230         DWORD grfMode,
4231         SNB16 snbExclude,
4232         DWORD reserved,
4233         IStorage16** ppstg) = 0;
4234
4235     virtual HRESULT STDMETHODCALLTYPE CopyTo(
4236         DWORD ciidExclude,
4237         const IID* rgiidExclude,
4238         SNB16 snbExclude,
4239         IStorage16* pstgDest) = 0;
4240
4241     virtual HRESULT STDMETHODCALLTYPE MoveElementTo(
4242         LPCOLESTR16 pwcsName,
4243         IStorage16* pstgDest,
4244         LPCOLESTR16 pwcsNewName,
4245         DWORD grfFlags) = 0;
4246
4247     virtual HRESULT STDMETHODCALLTYPE Commit(
4248         DWORD grfCommitFlags) = 0;
4249
4250     virtual HRESULT STDMETHODCALLTYPE Revert(
4251         ) = 0;
4252
4253     virtual HRESULT STDMETHODCALLTYPE EnumElements(
4254         DWORD reserved1,
4255         void* reserved2,
4256         DWORD reserved3,
4257         IEnumSTATSTG** ppenum) = 0;
4258
4259     virtual HRESULT STDMETHODCALLTYPE DestroyElement(
4260         LPCOLESTR16 pwcsName) = 0;
4261
4262     virtual HRESULT STDMETHODCALLTYPE RenameElement(
4263         LPCOLESTR16 pwcsOldName,
4264         LPCOLESTR16 pwcsNewName) = 0;
4265
4266     virtual HRESULT STDMETHODCALLTYPE SetElementTimes(
4267         LPCOLESTR16 pwcsName,
4268         const FILETIME* pctime,
4269         const FILETIME* patime,
4270         const FILETIME* pmtime) = 0;
4271
4272     virtual HRESULT STDMETHODCALLTYPE SetClass(
4273         REFCLSID clsid) = 0;
4274
4275     virtual HRESULT STDMETHODCALLTYPE SetStateBits(
4276         DWORD grfStateBits,
4277         DWORD grfMask) = 0;
4278
4279     virtual HRESULT STDMETHODCALLTYPE Stat(
4280         STATSTG* pstatstg,
4281         DWORD grfStatFlag) = 0;
4282
4283 };
4284 #else
4285 typedef struct IStorage16Vtbl IStorage16Vtbl;
4286 struct IStorage16 {
4287     const IStorage16Vtbl* lpVtbl;
4288 };
4289 struct IStorage16Vtbl {
4290     ICOM_MSVTABLE_COMPAT_FIELDS
4291
4292     /*** IUnknown methods ***/
4293     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
4294         IStorage16* This,
4295         REFIID riid,
4296         void** ppvObject);
4297
4298     ULONG (STDMETHODCALLTYPE *AddRef)(
4299         IStorage16* This);
4300
4301     ULONG (STDMETHODCALLTYPE *Release)(
4302         IStorage16* This);
4303
4304     /*** IStorage16 methods ***/
4305     HRESULT (STDMETHODCALLTYPE *CreateStream)(
4306         IStorage16* This,
4307         LPCOLESTR16 pwcsName,
4308         DWORD grfMode,
4309         DWORD reserved1,
4310         DWORD reserved2,
4311         IStream16** ppstm);
4312
4313     HRESULT (STDMETHODCALLTYPE *OpenStream)(
4314         IStorage16* This,
4315         LPCOLESTR16 pwcsName,
4316         void* reserved1,
4317         DWORD grfMode,
4318         DWORD reserved2,
4319         IStream16** ppstm);
4320
4321     HRESULT (STDMETHODCALLTYPE *CreateStorage)(
4322         IStorage16* This,
4323         LPCOLESTR16 pwcsName,
4324         DWORD grfMode,
4325         DWORD dwStgFmt,
4326         DWORD reserved2,
4327         IStorage16** ppstg);
4328
4329     HRESULT (STDMETHODCALLTYPE *OpenStorage)(
4330         IStorage16* This,
4331         LPCOLESTR16 pwcsName,
4332         IStorage16* pstgPriority,
4333         DWORD grfMode,
4334         SNB16 snbExclude,
4335         DWORD reserved,
4336         IStorage16** ppstg);
4337
4338     HRESULT (STDMETHODCALLTYPE *CopyTo)(
4339         IStorage16* This,
4340         DWORD ciidExclude,
4341         const IID* rgiidExclude,
4342         SNB16 snbExclude,
4343         IStorage16* pstgDest);
4344
4345     HRESULT (STDMETHODCALLTYPE *MoveElementTo)(
4346         IStorage16* This,
4347         LPCOLESTR16 pwcsName,
4348         IStorage16* pstgDest,
4349         LPCOLESTR16 pwcsNewName,
4350         DWORD grfFlags);
4351
4352     HRESULT (STDMETHODCALLTYPE *Commit)(
4353         IStorage16* This,
4354         DWORD grfCommitFlags);
4355
4356     HRESULT (STDMETHODCALLTYPE *Revert)(
4357         IStorage16* This);
4358
4359     HRESULT (STDMETHODCALLTYPE *EnumElements)(
4360         IStorage16* This,
4361         DWORD reserved1,
4362         void* reserved2,
4363         DWORD reserved3,
4364         IEnumSTATSTG** ppenum);
4365
4366     HRESULT (STDMETHODCALLTYPE *DestroyElement)(
4367         IStorage16* This,
4368         LPCOLESTR16 pwcsName);
4369
4370     HRESULT (STDMETHODCALLTYPE *RenameElement)(
4371         IStorage16* This,
4372         LPCOLESTR16 pwcsOldName,
4373         LPCOLESTR16 pwcsNewName);
4374
4375     HRESULT (STDMETHODCALLTYPE *SetElementTimes)(
4376         IStorage16* This,
4377         LPCOLESTR16 pwcsName,
4378         const FILETIME* pctime,
4379         const FILETIME* patime,
4380         const FILETIME* pmtime);
4381
4382     HRESULT (STDMETHODCALLTYPE *SetClass)(
4383         IStorage16* This,
4384         REFCLSID clsid);
4385
4386     HRESULT (STDMETHODCALLTYPE *SetStateBits)(
4387         IStorage16* This,
4388         DWORD grfStateBits,
4389         DWORD grfMask);
4390
4391     HRESULT (STDMETHODCALLTYPE *Stat)(
4392         IStorage16* This,
4393         STATSTG* pstatstg,
4394         DWORD grfStatFlag);
4395
4396 };
4397
4398 /*** IUnknown methods ***/
4399 #define IStorage16_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
4400 #define IStorage16_AddRef(p) (p)->lpVtbl->AddRef(p)
4401 #define IStorage16_Release(p) (p)->lpVtbl->Release(p)
4402 /*** IStorage16 methods ***/
4403 #define IStorage16_CreateStream(p,a,b,c,d,e) (p)->lpVtbl->CreateStream(p,a,b,c,d,e)
4404 #define IStorage16_OpenStream(p,a,b,c,d,e) (p)->lpVtbl->OpenStream(p,a,b,c,d,e)
4405 #define IStorage16_CreateStorage(p,a,b,c,d,e) (p)->lpVtbl->CreateStorage(p,a,b,c,d,e)
4406 #define IStorage16_OpenStorage(p,a,b,c,d,e,f) (p)->lpVtbl->OpenStorage(p,a,b,c,d,e,f)
4407 #define IStorage16_CopyTo(p,a,b,c,d) (p)->lpVtbl->CopyTo(p,a,b,c,d)
4408 #define IStorage16_MoveElementTo(p,a,b,c,d) (p)->lpVtbl->MoveElementTo(p,a,b,c,d)
4409 #define IStorage16_Commit(p,a) (p)->lpVtbl->Commit(p,a)
4410 #define IStorage16_Revert(p) (p)->lpVtbl->Revert(p)
4411 #define IStorage16_EnumElements(p,a,b,c,d) (p)->lpVtbl->EnumElements(p,a,b,c,d)
4412 #define IStorage16_DestroyElement(p,a) (p)->lpVtbl->DestroyElement(p,a)
4413 #define IStorage16_RenameElement(p,a,b) (p)->lpVtbl->RenameElement(p,a,b)
4414 #define IStorage16_SetElementTimes(p,a,b,c,d) (p)->lpVtbl->SetElementTimes(p,a,b,c,d)
4415 #define IStorage16_SetClass(p,a) (p)->lpVtbl->SetClass(p,a)
4416 #define IStorage16_SetStateBits(p,a,b) (p)->lpVtbl->SetStateBits(p,a,b)
4417 #define IStorage16_Stat(p,a,b) (p)->lpVtbl->Stat(p,a,b)
4418
4419 #endif
4420
4421 #define IStorage16_METHODS \
4422     ICOM_MSVTABLE_COMPAT_FIELDS \
4423     /*** IUnknown methods ***/ \
4424     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
4425     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
4426     STDMETHOD_(ULONG,Release)(THIS) PURE; \
4427     /*** IStorage16 methods ***/ \
4428     STDMETHOD_(HRESULT,CreateStream)(THIS_ LPCOLESTR16 pwcsName, DWORD grfMode, DWORD reserved1, DWORD reserved2, IStream16** ppstm) PURE; \
4429     STDMETHOD_(HRESULT,OpenStream)(THIS_ LPCOLESTR16 pwcsName, void* reserved1, DWORD grfMode, DWORD reserved2, IStream16** ppstm) PURE; \
4430     STDMETHOD_(HRESULT,CreateStorage)(THIS_ LPCOLESTR16 pwcsName, DWORD grfMode, DWORD dwStgFmt, DWORD reserved2, IStorage16** ppstg) PURE; \
4431     STDMETHOD_(HRESULT,OpenStorage)(THIS_ LPCOLESTR16 pwcsName, IStorage16* pstgPriority, DWORD grfMode, SNB16 snbExclude, DWORD reserved, IStorage16** ppstg) PURE; \
4432     STDMETHOD_(HRESULT,CopyTo)(THIS_ DWORD ciidExclude, const IID* rgiidExclude, SNB16 snbExclude, IStorage16* pstgDest) PURE; \
4433     STDMETHOD_(HRESULT,MoveElementTo)(THIS_ LPCOLESTR16 pwcsName, IStorage16* pstgDest, LPCOLESTR16 pwcsNewName, DWORD grfFlags) PURE; \
4434     STDMETHOD_(HRESULT,Commit)(THIS_ DWORD grfCommitFlags) PURE; \
4435     STDMETHOD_(HRESULT,Revert)(THIS) PURE; \
4436     STDMETHOD_(HRESULT,EnumElements)(THIS_ DWORD reserved1, void* reserved2, DWORD reserved3, IEnumSTATSTG** ppenum) PURE; \
4437     STDMETHOD_(HRESULT,DestroyElement)(THIS_ LPCOLESTR16 pwcsName) PURE; \
4438     STDMETHOD_(HRESULT,RenameElement)(THIS_ LPCOLESTR16 pwcsOldName, LPCOLESTR16 pwcsNewName) PURE; \
4439     STDMETHOD_(HRESULT,SetElementTimes)(THIS_ LPCOLESTR16 pwcsName, const FILETIME* pctime, const FILETIME* patime, const FILETIME* pmtime) PURE; \
4440     STDMETHOD_(HRESULT,SetClass)(THIS_ REFCLSID clsid) PURE; \
4441     STDMETHOD_(HRESULT,SetStateBits)(THIS_ DWORD grfStateBits, DWORD grfMask) PURE; \
4442     STDMETHOD_(HRESULT,Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE;
4443
4444 HRESULT CALLBACK IStorage16_CreateStream_Proxy(
4445     IStorage16* This,
4446     LPCOLESTR16 pwcsName,
4447     DWORD grfMode,
4448     DWORD reserved1,
4449     DWORD reserved2,
4450     IStream16** ppstm);
4451 void __RPC_STUB IStorage16_CreateStream_Stub(
4452     struct IRpcStubBuffer* This,
4453     struct IRpcChannelBuffer* pRpcChannelBuffer,
4454     PRPC_MESSAGE pRpcMessage,
4455     DWORD* pdwStubPhase);
4456 HRESULT CALLBACK IStorage16_RemoteOpenStream_Proxy(
4457     IStorage16* This,
4458     LPCOLESTR16 pwcsName,
4459     unsigned long cbReserved1,
4460     byte* reserved1,
4461     DWORD grfMode,
4462     DWORD reserved2,
4463     IStream16** ppstm);
4464 void __RPC_STUB IStorage16_RemoteOpenStream_Stub(
4465     struct IRpcStubBuffer* This,
4466     struct IRpcChannelBuffer* pRpcChannelBuffer,
4467     PRPC_MESSAGE pRpcMessage,
4468     DWORD* pdwStubPhase);
4469 HRESULT CALLBACK IStorage16_OpenStream_Proxy(
4470     IStorage16* This,
4471     LPCOLESTR16 pwcsName,
4472     void* reserved1,
4473     DWORD grfMode,
4474     DWORD reserved2,
4475     IStream16** ppstm);
4476 HRESULT __RPC_STUB IStorage16_OpenStream_Stub(
4477     IStorage16* This,
4478     LPCOLESTR16 pwcsName,
4479     unsigned long cbReserved1,
4480     byte* reserved1,
4481     DWORD grfMode,
4482     DWORD reserved2,
4483     IStream16** ppstm);
4484 HRESULT CALLBACK IStorage16_CreateStorage_Proxy(
4485     IStorage16* This,
4486     LPCOLESTR16 pwcsName,
4487     DWORD grfMode,
4488     DWORD dwStgFmt,
4489     DWORD reserved2,
4490     IStorage16** ppstg);
4491 void __RPC_STUB IStorage16_CreateStorage_Stub(
4492     struct IRpcStubBuffer* This,
4493     struct IRpcChannelBuffer* pRpcChannelBuffer,
4494     PRPC_MESSAGE pRpcMessage,
4495     DWORD* pdwStubPhase);
4496 HRESULT CALLBACK IStorage16_OpenStorage_Proxy(
4497     IStorage16* This,
4498     LPCOLESTR16 pwcsName,
4499     IStorage16* pstgPriority,
4500     DWORD grfMode,
4501     SNB16 snbExclude,
4502     DWORD reserved,
4503     IStorage16** ppstg);
4504 void __RPC_STUB IStorage16_OpenStorage_Stub(
4505     struct IRpcStubBuffer* This,
4506     struct IRpcChannelBuffer* pRpcChannelBuffer,
4507     PRPC_MESSAGE pRpcMessage,
4508     DWORD* pdwStubPhase);
4509 HRESULT CALLBACK IStorage16_CopyTo_Proxy(
4510     IStorage16* This,
4511     DWORD ciidExclude,
4512     const IID* rgiidExclude,
4513     SNB16 snbExclude,
4514     IStorage16* pstgDest);
4515 void __RPC_STUB IStorage16_CopyTo_Stub(
4516     struct IRpcStubBuffer* This,
4517     struct IRpcChannelBuffer* pRpcChannelBuffer,
4518     PRPC_MESSAGE pRpcMessage,
4519     DWORD* pdwStubPhase);
4520 HRESULT CALLBACK IStorage16_MoveElementTo_Proxy(
4521     IStorage16* This,
4522     LPCOLESTR16 pwcsName,
4523     IStorage16* pstgDest,
4524     LPCOLESTR16 pwcsNewName,
4525     DWORD grfFlags);
4526 void __RPC_STUB IStorage16_MoveElementTo_Stub(
4527     struct IRpcStubBuffer* This,
4528     struct IRpcChannelBuffer* pRpcChannelBuffer,
4529     PRPC_MESSAGE pRpcMessage,
4530     DWORD* pdwStubPhase);
4531 HRESULT CALLBACK IStorage16_Commit_Proxy(
4532     IStorage16* This,
4533     DWORD grfCommitFlags);
4534 void __RPC_STUB IStorage16_Commit_Stub(
4535     struct IRpcStubBuffer* This,
4536     struct IRpcChannelBuffer* pRpcChannelBuffer,
4537     PRPC_MESSAGE pRpcMessage,
4538     DWORD* pdwStubPhase);
4539 HRESULT CALLBACK IStorage16_Revert_Proxy(
4540     IStorage16* This);
4541 void __RPC_STUB IStorage16_Revert_Stub(
4542     struct IRpcStubBuffer* This,
4543     struct IRpcChannelBuffer* pRpcChannelBuffer,
4544     PRPC_MESSAGE pRpcMessage,
4545     DWORD* pdwStubPhase);
4546 HRESULT CALLBACK IStorage16_RemoteEnumElements_Proxy(
4547     IStorage16* This,
4548     DWORD reserved1,
4549     unsigned long cbReserved2,
4550     byte* reserved2,
4551     DWORD reserved3,
4552     IEnumSTATSTG** ppenum);
4553 void __RPC_STUB IStorage16_RemoteEnumElements_Stub(
4554     struct IRpcStubBuffer* This,
4555     struct IRpcChannelBuffer* pRpcChannelBuffer,
4556     PRPC_MESSAGE pRpcMessage,
4557     DWORD* pdwStubPhase);
4558 HRESULT CALLBACK IStorage16_EnumElements_Proxy(
4559     IStorage16* This,
4560     DWORD reserved1,
4561     void* reserved2,
4562     DWORD reserved3,
4563     IEnumSTATSTG** ppenum);
4564 HRESULT __RPC_STUB IStorage16_EnumElements_Stub(
4565     IStorage16* This,
4566     DWORD reserved1,
4567     unsigned long cbReserved2,
4568     byte* reserved2,
4569     DWORD reserved3,
4570     IEnumSTATSTG** ppenum);
4571 HRESULT CALLBACK IStorage16_DestroyElement_Proxy(
4572     IStorage16* This,
4573     LPCOLESTR16 pwcsName);
4574 void __RPC_STUB IStorage16_DestroyElement_Stub(
4575     struct IRpcStubBuffer* This,
4576     struct IRpcChannelBuffer* pRpcChannelBuffer,
4577     PRPC_MESSAGE pRpcMessage,
4578     DWORD* pdwStubPhase);
4579 HRESULT CALLBACK IStorage16_RenameElement_Proxy(
4580     IStorage16* This,
4581     LPCOLESTR16 pwcsOldName,
4582     LPCOLESTR16 pwcsNewName);
4583 void __RPC_STUB IStorage16_RenameElement_Stub(
4584     struct IRpcStubBuffer* This,
4585     struct IRpcChannelBuffer* pRpcChannelBuffer,
4586     PRPC_MESSAGE pRpcMessage,
4587     DWORD* pdwStubPhase);
4588 HRESULT CALLBACK IStorage16_SetElementTimes_Proxy(
4589     IStorage16* This,
4590     LPCOLESTR16 pwcsName,
4591     const FILETIME* pctime,
4592     const FILETIME* patime,
4593     const FILETIME* pmtime);
4594 void __RPC_STUB IStorage16_SetElementTimes_Stub(
4595     struct IRpcStubBuffer* This,
4596     struct IRpcChannelBuffer* pRpcChannelBuffer,
4597     PRPC_MESSAGE pRpcMessage,
4598     DWORD* pdwStubPhase);
4599 HRESULT CALLBACK IStorage16_SetClass_Proxy(
4600     IStorage16* This,
4601     REFCLSID clsid);
4602 void __RPC_STUB IStorage16_SetClass_Stub(
4603     struct IRpcStubBuffer* This,
4604     struct IRpcChannelBuffer* pRpcChannelBuffer,
4605     PRPC_MESSAGE pRpcMessage,
4606     DWORD* pdwStubPhase);
4607 HRESULT CALLBACK IStorage16_SetStateBits_Proxy(
4608     IStorage16* This,
4609     DWORD grfStateBits,
4610     DWORD grfMask);
4611 void __RPC_STUB IStorage16_SetStateBits_Stub(
4612     struct IRpcStubBuffer* This,
4613     struct IRpcChannelBuffer* pRpcChannelBuffer,
4614     PRPC_MESSAGE pRpcMessage,
4615     DWORD* pdwStubPhase);
4616 HRESULT CALLBACK IStorage16_Stat_Proxy(
4617     IStorage16* This,
4618     STATSTG* pstatstg,
4619     DWORD grfStatFlag);
4620 void __RPC_STUB IStorage16_Stat_Stub(
4621     struct IRpcStubBuffer* This,
4622     struct IRpcChannelBuffer* pRpcChannelBuffer,
4623     PRPC_MESSAGE pRpcMessage,
4624     DWORD* pdwStubPhase);
4625
4626 typedef struct IPersistFile IPersistFile;
4627 typedef IPersistFile *LPPERSISTFILE;
4628
4629 /*****************************************************************************
4630  * IPersistFile interface
4631  */
4632 DEFINE_GUID(IID_IPersistFile, 0x0000010b, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
4633 #if defined(__cplusplus) && !defined(CINTERFACE)
4634 struct IPersistFile : public IPersist
4635 {
4636     virtual HRESULT STDMETHODCALLTYPE IsDirty(
4637         ) = 0;
4638
4639     virtual HRESULT STDMETHODCALLTYPE Load(
4640         LPCOLESTR pszFileName,
4641         DWORD dwMode) = 0;
4642
4643     virtual HRESULT STDMETHODCALLTYPE Save(
4644         LPCOLESTR pszFileName,
4645         BOOL fRemember) = 0;
4646
4647     virtual HRESULT STDMETHODCALLTYPE SaveCompleted(
4648         LPCOLESTR pszFileName) = 0;
4649
4650     virtual HRESULT STDMETHODCALLTYPE GetCurFile(
4651         LPOLESTR* ppszFileName) = 0;
4652
4653 };
4654 #else
4655 typedef struct IPersistFileVtbl IPersistFileVtbl;
4656 struct IPersistFile {
4657     const IPersistFileVtbl* lpVtbl;
4658 };
4659 struct IPersistFileVtbl {
4660     ICOM_MSVTABLE_COMPAT_FIELDS
4661
4662     /*** IUnknown methods ***/
4663     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
4664         IPersistFile* This,
4665         REFIID riid,
4666         void** ppvObject);
4667
4668     ULONG (STDMETHODCALLTYPE *AddRef)(
4669         IPersistFile* This);
4670
4671     ULONG (STDMETHODCALLTYPE *Release)(
4672         IPersistFile* This);
4673
4674     /*** IPersist methods ***/
4675     HRESULT (STDMETHODCALLTYPE *GetClassID)(
4676         IPersistFile* This,
4677         CLSID* pClassID);
4678
4679     /*** IPersistFile methods ***/
4680     HRESULT (STDMETHODCALLTYPE *IsDirty)(
4681         IPersistFile* This);
4682
4683     HRESULT (STDMETHODCALLTYPE *Load)(
4684         IPersistFile* This,
4685         LPCOLESTR pszFileName,
4686         DWORD dwMode);
4687
4688     HRESULT (STDMETHODCALLTYPE *Save)(
4689         IPersistFile* This,
4690         LPCOLESTR pszFileName,
4691         BOOL fRemember);
4692
4693     HRESULT (STDMETHODCALLTYPE *SaveCompleted)(
4694         IPersistFile* This,
4695         LPCOLESTR pszFileName);
4696
4697     HRESULT (STDMETHODCALLTYPE *GetCurFile)(
4698         IPersistFile* This,
4699         LPOLESTR* ppszFileName);
4700
4701 };
4702
4703 /*** IUnknown methods ***/
4704 #define IPersistFile_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
4705 #define IPersistFile_AddRef(p) (p)->lpVtbl->AddRef(p)
4706 #define IPersistFile_Release(p) (p)->lpVtbl->Release(p)
4707 /*** IPersist methods ***/
4708 #define IPersistFile_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
4709 /*** IPersistFile methods ***/
4710 #define IPersistFile_IsDirty(p) (p)->lpVtbl->IsDirty(p)
4711 #define IPersistFile_Load(p,a,b) (p)->lpVtbl->Load(p,a,b)
4712 #define IPersistFile_Save(p,a,b) (p)->lpVtbl->Save(p,a,b)
4713 #define IPersistFile_SaveCompleted(p,a) (p)->lpVtbl->SaveCompleted(p,a)
4714 #define IPersistFile_GetCurFile(p,a) (p)->lpVtbl->GetCurFile(p,a)
4715
4716 #endif
4717
4718 #define IPersistFile_METHODS \
4719     ICOM_MSVTABLE_COMPAT_FIELDS \
4720     /*** IUnknown methods ***/ \
4721     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
4722     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
4723     STDMETHOD_(ULONG,Release)(THIS) PURE; \
4724     /*** IPersist methods ***/ \
4725     STDMETHOD_(HRESULT,GetClassID)(THIS_ CLSID* pClassID) PURE; \
4726     /*** IPersistFile methods ***/ \
4727     STDMETHOD_(HRESULT,IsDirty)(THIS) PURE; \
4728     STDMETHOD_(HRESULT,Load)(THIS_ LPCOLESTR pszFileName, DWORD dwMode) PURE; \
4729     STDMETHOD_(HRESULT,Save)(THIS_ LPCOLESTR pszFileName, BOOL fRemember) PURE; \
4730     STDMETHOD_(HRESULT,SaveCompleted)(THIS_ LPCOLESTR pszFileName) PURE; \
4731     STDMETHOD_(HRESULT,GetCurFile)(THIS_ LPOLESTR* ppszFileName) PURE;
4732
4733 HRESULT CALLBACK IPersistFile_IsDirty_Proxy(
4734     IPersistFile* This);
4735 void __RPC_STUB IPersistFile_IsDirty_Stub(
4736     struct IRpcStubBuffer* This,
4737     struct IRpcChannelBuffer* pRpcChannelBuffer,
4738     PRPC_MESSAGE pRpcMessage,
4739     DWORD* pdwStubPhase);
4740 HRESULT CALLBACK IPersistFile_Load_Proxy(
4741     IPersistFile* This,
4742     LPCOLESTR pszFileName,
4743     DWORD dwMode);
4744 void __RPC_STUB IPersistFile_Load_Stub(
4745     struct IRpcStubBuffer* This,
4746     struct IRpcChannelBuffer* pRpcChannelBuffer,
4747     PRPC_MESSAGE pRpcMessage,
4748     DWORD* pdwStubPhase);
4749 HRESULT CALLBACK IPersistFile_Save_Proxy(
4750     IPersistFile* This,
4751     LPCOLESTR pszFileName,
4752     BOOL fRemember);
4753 void __RPC_STUB IPersistFile_Save_Stub(
4754     struct IRpcStubBuffer* This,
4755     struct IRpcChannelBuffer* pRpcChannelBuffer,
4756     PRPC_MESSAGE pRpcMessage,
4757     DWORD* pdwStubPhase);
4758 HRESULT CALLBACK IPersistFile_SaveCompleted_Proxy(
4759     IPersistFile* This,
4760     LPCOLESTR pszFileName);
4761 void __RPC_STUB IPersistFile_SaveCompleted_Stub(
4762     struct IRpcStubBuffer* This,
4763     struct IRpcChannelBuffer* pRpcChannelBuffer,
4764     PRPC_MESSAGE pRpcMessage,
4765     DWORD* pdwStubPhase);
4766 HRESULT CALLBACK IPersistFile_GetCurFile_Proxy(
4767     IPersistFile* This,
4768     LPOLESTR* ppszFileName);
4769 void __RPC_STUB IPersistFile_GetCurFile_Stub(
4770     struct IRpcStubBuffer* This,
4771     struct IRpcChannelBuffer* pRpcChannelBuffer,
4772     PRPC_MESSAGE pRpcMessage,
4773     DWORD* pdwStubPhase);
4774
4775 typedef struct IPersistStorage IPersistStorage;
4776 typedef IPersistStorage *LPPERSISTSTORAGE;
4777
4778 /*****************************************************************************
4779  * IPersistStorage interface
4780  */
4781 DEFINE_GUID(IID_IPersistStorage, 0x0000010a, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
4782 #if defined(__cplusplus) && !defined(CINTERFACE)
4783 struct IPersistStorage : public IPersist
4784 {
4785     virtual HRESULT STDMETHODCALLTYPE IsDirty(
4786         ) = 0;
4787
4788     virtual HRESULT STDMETHODCALLTYPE InitNew(
4789         IStorage* pStg) = 0;
4790
4791     virtual HRESULT STDMETHODCALLTYPE Load(
4792         IStorage* pStg) = 0;
4793
4794     virtual HRESULT STDMETHODCALLTYPE Save(
4795         IStorage* pStgSave,
4796         BOOL fSameAsLoad) = 0;
4797
4798     virtual HRESULT STDMETHODCALLTYPE SaveCompleted(
4799         IStorage* pStgNew) = 0;
4800
4801     virtual HRESULT STDMETHODCALLTYPE HandsOffStorage(
4802         ) = 0;
4803
4804 };
4805 #else
4806 typedef struct IPersistStorageVtbl IPersistStorageVtbl;
4807 struct IPersistStorage {
4808     const IPersistStorageVtbl* lpVtbl;
4809 };
4810 struct IPersistStorageVtbl {
4811     ICOM_MSVTABLE_COMPAT_FIELDS
4812
4813     /*** IUnknown methods ***/
4814     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
4815         IPersistStorage* This,
4816         REFIID riid,
4817         void** ppvObject);
4818
4819     ULONG (STDMETHODCALLTYPE *AddRef)(
4820         IPersistStorage* This);
4821
4822     ULONG (STDMETHODCALLTYPE *Release)(
4823         IPersistStorage* This);
4824
4825     /*** IPersist methods ***/
4826     HRESULT (STDMETHODCALLTYPE *GetClassID)(
4827         IPersistStorage* This,
4828         CLSID* pClassID);
4829
4830     /*** IPersistStorage methods ***/
4831     HRESULT (STDMETHODCALLTYPE *IsDirty)(
4832         IPersistStorage* This);
4833
4834     HRESULT (STDMETHODCALLTYPE *InitNew)(
4835         IPersistStorage* This,
4836         IStorage* pStg);
4837
4838     HRESULT (STDMETHODCALLTYPE *Load)(
4839         IPersistStorage* This,
4840         IStorage* pStg);
4841
4842     HRESULT (STDMETHODCALLTYPE *Save)(
4843         IPersistStorage* This,
4844         IStorage* pStgSave,
4845         BOOL fSameAsLoad);
4846
4847     HRESULT (STDMETHODCALLTYPE *SaveCompleted)(
4848         IPersistStorage* This,
4849         IStorage* pStgNew);
4850
4851     HRESULT (STDMETHODCALLTYPE *HandsOffStorage)(
4852         IPersistStorage* This);
4853
4854 };
4855
4856 /*** IUnknown methods ***/
4857 #define IPersistStorage_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
4858 #define IPersistStorage_AddRef(p) (p)->lpVtbl->AddRef(p)
4859 #define IPersistStorage_Release(p) (p)->lpVtbl->Release(p)
4860 /*** IPersist methods ***/
4861 #define IPersistStorage_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
4862 /*** IPersistStorage methods ***/
4863 #define IPersistStorage_IsDirty(p) (p)->lpVtbl->IsDirty(p)
4864 #define IPersistStorage_InitNew(p,a) (p)->lpVtbl->InitNew(p,a)
4865 #define IPersistStorage_Load(p,a) (p)->lpVtbl->Load(p,a)
4866 #define IPersistStorage_Save(p,a,b) (p)->lpVtbl->Save(p,a,b)
4867 #define IPersistStorage_SaveCompleted(p,a) (p)->lpVtbl->SaveCompleted(p,a)
4868 #define IPersistStorage_HandsOffStorage(p) (p)->lpVtbl->HandsOffStorage(p)
4869
4870 #endif
4871
4872 #define IPersistStorage_METHODS \
4873     ICOM_MSVTABLE_COMPAT_FIELDS \
4874     /*** IUnknown methods ***/ \
4875     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
4876     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
4877     STDMETHOD_(ULONG,Release)(THIS) PURE; \
4878     /*** IPersist methods ***/ \
4879     STDMETHOD_(HRESULT,GetClassID)(THIS_ CLSID* pClassID) PURE; \
4880     /*** IPersistStorage methods ***/ \
4881     STDMETHOD_(HRESULT,IsDirty)(THIS) PURE; \
4882     STDMETHOD_(HRESULT,InitNew)(THIS_ IStorage* pStg) PURE; \
4883     STDMETHOD_(HRESULT,Load)(THIS_ IStorage* pStg) PURE; \
4884     STDMETHOD_(HRESULT,Save)(THIS_ IStorage* pStgSave, BOOL fSameAsLoad) PURE; \
4885     STDMETHOD_(HRESULT,SaveCompleted)(THIS_ IStorage* pStgNew) PURE; \
4886     STDMETHOD_(HRESULT,HandsOffStorage)(THIS) PURE;
4887
4888 HRESULT CALLBACK IPersistStorage_IsDirty_Proxy(
4889     IPersistStorage* This);
4890 void __RPC_STUB IPersistStorage_IsDirty_Stub(
4891     struct IRpcStubBuffer* This,
4892     struct IRpcChannelBuffer* pRpcChannelBuffer,
4893     PRPC_MESSAGE pRpcMessage,
4894     DWORD* pdwStubPhase);
4895 HRESULT CALLBACK IPersistStorage_InitNew_Proxy(
4896     IPersistStorage* This,
4897     IStorage* pStg);
4898 void __RPC_STUB IPersistStorage_InitNew_Stub(
4899     struct IRpcStubBuffer* This,
4900     struct IRpcChannelBuffer* pRpcChannelBuffer,
4901     PRPC_MESSAGE pRpcMessage,
4902     DWORD* pdwStubPhase);
4903 HRESULT CALLBACK IPersistStorage_Load_Proxy(
4904     IPersistStorage* This,
4905     IStorage* pStg);
4906 void __RPC_STUB IPersistStorage_Load_Stub(
4907     struct IRpcStubBuffer* This,
4908     struct IRpcChannelBuffer* pRpcChannelBuffer,
4909     PRPC_MESSAGE pRpcMessage,
4910     DWORD* pdwStubPhase);
4911 HRESULT CALLBACK IPersistStorage_Save_Proxy(
4912     IPersistStorage* This,
4913     IStorage* pStgSave,
4914     BOOL fSameAsLoad);
4915 void __RPC_STUB IPersistStorage_Save_Stub(
4916     struct IRpcStubBuffer* This,
4917     struct IRpcChannelBuffer* pRpcChannelBuffer,
4918     PRPC_MESSAGE pRpcMessage,
4919     DWORD* pdwStubPhase);
4920 HRESULT CALLBACK IPersistStorage_SaveCompleted_Proxy(
4921     IPersistStorage* This,
4922     IStorage* pStgNew);
4923 void __RPC_STUB IPersistStorage_SaveCompleted_Stub(
4924     struct IRpcStubBuffer* This,
4925     struct IRpcChannelBuffer* pRpcChannelBuffer,
4926     PRPC_MESSAGE pRpcMessage,
4927     DWORD* pdwStubPhase);
4928 HRESULT CALLBACK IPersistStorage_HandsOffStorage_Proxy(
4929     IPersistStorage* This);
4930 void __RPC_STUB IPersistStorage_HandsOffStorage_Stub(
4931     struct IRpcStubBuffer* This,
4932     struct IRpcChannelBuffer* pRpcChannelBuffer,
4933     PRPC_MESSAGE pRpcMessage,
4934     DWORD* pdwStubPhase);
4935
4936 typedef struct IRootStorage IRootStorage;
4937 typedef IRootStorage *LPROOTSTORAGE;
4938
4939 /*****************************************************************************
4940  * IRootStorage interface
4941  */
4942 DEFINE_GUID(IID_IRootStorage, 0x00000012, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
4943 #if defined(__cplusplus) && !defined(CINTERFACE)
4944 struct IRootStorage : public IUnknown
4945 {
4946     virtual HRESULT STDMETHODCALLTYPE SwitchToFile(
4947         LPOLESTR pszFile) = 0;
4948
4949 };
4950 #else
4951 typedef struct IRootStorageVtbl IRootStorageVtbl;
4952 struct IRootStorage {
4953     const IRootStorageVtbl* lpVtbl;
4954 };
4955 struct IRootStorageVtbl {
4956     ICOM_MSVTABLE_COMPAT_FIELDS
4957
4958     /*** IUnknown methods ***/
4959     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
4960         IRootStorage* This,
4961         REFIID riid,
4962         void** ppvObject);
4963
4964     ULONG (STDMETHODCALLTYPE *AddRef)(
4965         IRootStorage* This);
4966
4967     ULONG (STDMETHODCALLTYPE *Release)(
4968         IRootStorage* This);
4969
4970     /*** IRootStorage methods ***/
4971     HRESULT (STDMETHODCALLTYPE *SwitchToFile)(
4972         IRootStorage* This,
4973         LPOLESTR pszFile);
4974
4975 };
4976
4977 /*** IUnknown methods ***/
4978 #define IRootStorage_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
4979 #define IRootStorage_AddRef(p) (p)->lpVtbl->AddRef(p)
4980 #define IRootStorage_Release(p) (p)->lpVtbl->Release(p)
4981 /*** IRootStorage methods ***/
4982 #define IRootStorage_SwitchToFile(p,a) (p)->lpVtbl->SwitchToFile(p,a)
4983
4984 #endif
4985
4986 #define IRootStorage_METHODS \
4987     ICOM_MSVTABLE_COMPAT_FIELDS \
4988     /*** IUnknown methods ***/ \
4989     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
4990     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
4991     STDMETHOD_(ULONG,Release)(THIS) PURE; \
4992     /*** IRootStorage methods ***/ \
4993     STDMETHOD_(HRESULT,SwitchToFile)(THIS_ LPOLESTR pszFile) PURE;
4994
4995 HRESULT CALLBACK IRootStorage_SwitchToFile_Proxy(
4996     IRootStorage* This,
4997     LPOLESTR pszFile);
4998 void __RPC_STUB IRootStorage_SwitchToFile_Stub(
4999     struct IRpcStubBuffer* This,
5000     struct IRpcChannelBuffer* pRpcChannelBuffer,
5001     PRPC_MESSAGE pRpcMessage,
5002     DWORD* pdwStubPhase);
5003
5004 typedef struct ILockBytes ILockBytes;
5005 typedef ILockBytes *LPLOCKBYTES;
5006
5007 /*****************************************************************************
5008  * ILockBytes interface
5009  */
5010 DEFINE_GUID(IID_ILockBytes, 0x0000000a, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
5011 #if defined(__cplusplus) && !defined(CINTERFACE)
5012 struct ILockBytes : public IUnknown
5013 {
5014     virtual HRESULT STDMETHODCALLTYPE ReadAt(
5015         ULARGE_INTEGER ulOffset,
5016         void* pv,
5017         ULONG cb,
5018         ULONG* pcbRead) = 0;
5019
5020     virtual HRESULT STDMETHODCALLTYPE WriteAt(
5021         ULARGE_INTEGER ulOffset,
5022         const void* pv,
5023         ULONG cb,
5024         ULONG* pcbWritten) = 0;
5025
5026     virtual HRESULT STDMETHODCALLTYPE Flush(
5027         ) = 0;
5028
5029     virtual HRESULT STDMETHODCALLTYPE SetSize(
5030         ULARGE_INTEGER cb) = 0;
5031
5032     virtual HRESULT STDMETHODCALLTYPE LockRegion(
5033         ULARGE_INTEGER libOffset,
5034         ULARGE_INTEGER cb,
5035         DWORD dwLockType) = 0;
5036
5037     virtual HRESULT STDMETHODCALLTYPE UnlockRegion(
5038         ULARGE_INTEGER libOffset,
5039         ULARGE_INTEGER cb,
5040         DWORD dwLockType) = 0;
5041
5042     virtual HRESULT STDMETHODCALLTYPE Stat(
5043         STATSTG* pstatstg,
5044         DWORD grfStatFlag) = 0;
5045
5046 };
5047 #else
5048 typedef struct ILockBytesVtbl ILockBytesVtbl;
5049 struct ILockBytes {
5050     const ILockBytesVtbl* lpVtbl;
5051 };
5052 struct ILockBytesVtbl {
5053     ICOM_MSVTABLE_COMPAT_FIELDS
5054
5055     /*** IUnknown methods ***/
5056     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
5057         ILockBytes* This,
5058         REFIID riid,
5059         void** ppvObject);
5060
5061     ULONG (STDMETHODCALLTYPE *AddRef)(
5062         ILockBytes* This);
5063
5064     ULONG (STDMETHODCALLTYPE *Release)(
5065         ILockBytes* This);
5066
5067     /*** ILockBytes methods ***/
5068     HRESULT (STDMETHODCALLTYPE *ReadAt)(
5069         ILockBytes* This,
5070         ULARGE_INTEGER ulOffset,
5071         void* pv,
5072         ULONG cb,
5073         ULONG* pcbRead);
5074
5075     HRESULT (STDMETHODCALLTYPE *WriteAt)(
5076         ILockBytes* This,
5077         ULARGE_INTEGER ulOffset,
5078         const void* pv,
5079         ULONG cb,
5080         ULONG* pcbWritten);
5081
5082     HRESULT (STDMETHODCALLTYPE *Flush)(
5083         ILockBytes* This);
5084
5085     HRESULT (STDMETHODCALLTYPE *SetSize)(
5086         ILockBytes* This,
5087         ULARGE_INTEGER cb);
5088
5089     HRESULT (STDMETHODCALLTYPE *LockRegion)(
5090         ILockBytes* This,
5091         ULARGE_INTEGER libOffset,
5092         ULARGE_INTEGER cb,
5093         DWORD dwLockType);
5094
5095     HRESULT (STDMETHODCALLTYPE *UnlockRegion)(
5096         ILockBytes* This,
5097         ULARGE_INTEGER libOffset,
5098         ULARGE_INTEGER cb,
5099         DWORD dwLockType);
5100
5101     HRESULT (STDMETHODCALLTYPE *Stat)(
5102         ILockBytes* This,
5103         STATSTG* pstatstg,
5104         DWORD grfStatFlag);
5105
5106 };
5107
5108 /*** IUnknown methods ***/
5109 #define ILockBytes_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
5110 #define ILockBytes_AddRef(p) (p)->lpVtbl->AddRef(p)
5111 #define ILockBytes_Release(p) (p)->lpVtbl->Release(p)
5112 /*** ILockBytes methods ***/
5113 #define ILockBytes_ReadAt(p,a,b,c,d) (p)->lpVtbl->ReadAt(p,a,b,c,d)
5114 #define ILockBytes_WriteAt(p,a,b,c,d) (p)->lpVtbl->WriteAt(p,a,b,c,d)
5115 #define ILockBytes_Flush(p) (p)->lpVtbl->Flush(p)
5116 #define ILockBytes_SetSize(p,a) (p)->lpVtbl->SetSize(p,a)
5117 #define ILockBytes_LockRegion(p,a,b,c) (p)->lpVtbl->LockRegion(p,a,b,c)
5118 #define ILockBytes_UnlockRegion(p,a,b,c) (p)->lpVtbl->UnlockRegion(p,a,b,c)
5119 #define ILockBytes_Stat(p,a,b) (p)->lpVtbl->Stat(p,a,b)
5120
5121 #endif
5122
5123 #define ILockBytes_METHODS \
5124     ICOM_MSVTABLE_COMPAT_FIELDS \
5125     /*** IUnknown methods ***/ \
5126     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
5127     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
5128     STDMETHOD_(ULONG,Release)(THIS) PURE; \
5129     /*** ILockBytes methods ***/ \
5130     STDMETHOD_(HRESULT,ReadAt)(THIS_ ULARGE_INTEGER ulOffset, void* pv, ULONG cb, ULONG* pcbRead) PURE; \
5131     STDMETHOD_(HRESULT,WriteAt)(THIS_ ULARGE_INTEGER ulOffset, const void* pv, ULONG cb, ULONG* pcbWritten) PURE; \
5132     STDMETHOD_(HRESULT,Flush)(THIS) PURE; \
5133     STDMETHOD_(HRESULT,SetSize)(THIS_ ULARGE_INTEGER cb) PURE; \
5134     STDMETHOD_(HRESULT,LockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; \
5135     STDMETHOD_(HRESULT,UnlockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE; \
5136     STDMETHOD_(HRESULT,Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE;
5137
5138 HRESULT CALLBACK ILockBytes_RemoteReadAt_Proxy(
5139     ILockBytes* This,
5140     ULARGE_INTEGER ulOffset,
5141     byte* pv,
5142     ULONG cb,
5143     ULONG* pcbRead);
5144 void __RPC_STUB ILockBytes_RemoteReadAt_Stub(
5145     struct IRpcStubBuffer* This,
5146     struct IRpcChannelBuffer* pRpcChannelBuffer,
5147     PRPC_MESSAGE pRpcMessage,
5148     DWORD* pdwStubPhase);
5149 HRESULT CALLBACK ILockBytes_ReadAt_Proxy(
5150     ILockBytes* This,
5151     ULARGE_INTEGER ulOffset,
5152     void* pv,
5153     ULONG cb,
5154     ULONG* pcbRead);
5155 HRESULT __RPC_STUB ILockBytes_ReadAt_Stub(
5156     ILockBytes* This,
5157     ULARGE_INTEGER ulOffset,
5158     byte* pv,
5159     ULONG cb,
5160     ULONG* pcbRead);
5161 HRESULT CALLBACK ILockBytes_RemoteWriteAt_Proxy(
5162     ILockBytes* This,
5163     ULARGE_INTEGER ulOffset,
5164     const byte* pv,
5165     ULONG cb,
5166     ULONG* pcbWritten);
5167 void __RPC_STUB ILockBytes_RemoteWriteAt_Stub(
5168     struct IRpcStubBuffer* This,
5169     struct IRpcChannelBuffer* pRpcChannelBuffer,
5170     PRPC_MESSAGE pRpcMessage,
5171     DWORD* pdwStubPhase);
5172 HRESULT CALLBACK ILockBytes_WriteAt_Proxy(
5173     ILockBytes* This,
5174     ULARGE_INTEGER ulOffset,
5175     const void* pv,
5176     ULONG cb,
5177     ULONG* pcbWritten);
5178 HRESULT __RPC_STUB ILockBytes_WriteAt_Stub(
5179     ILockBytes* This,
5180     ULARGE_INTEGER ulOffset,
5181     const byte* pv,
5182     ULONG cb,
5183     ULONG* pcbWritten);
5184 HRESULT CALLBACK ILockBytes_Flush_Proxy(
5185     ILockBytes* This);
5186 void __RPC_STUB ILockBytes_Flush_Stub(
5187     struct IRpcStubBuffer* This,
5188     struct IRpcChannelBuffer* pRpcChannelBuffer,
5189     PRPC_MESSAGE pRpcMessage,
5190     DWORD* pdwStubPhase);
5191 HRESULT CALLBACK ILockBytes_SetSize_Proxy(
5192     ILockBytes* This,
5193     ULARGE_INTEGER cb);
5194 void __RPC_STUB ILockBytes_SetSize_Stub(
5195     struct IRpcStubBuffer* This,
5196     struct IRpcChannelBuffer* pRpcChannelBuffer,
5197     PRPC_MESSAGE pRpcMessage,
5198     DWORD* pdwStubPhase);
5199 HRESULT CALLBACK ILockBytes_LockRegion_Proxy(
5200     ILockBytes* This,
5201     ULARGE_INTEGER libOffset,
5202     ULARGE_INTEGER cb,
5203     DWORD dwLockType);
5204 void __RPC_STUB ILockBytes_LockRegion_Stub(
5205     struct IRpcStubBuffer* This,
5206     struct IRpcChannelBuffer* pRpcChannelBuffer,
5207     PRPC_MESSAGE pRpcMessage,
5208     DWORD* pdwStubPhase);
5209 HRESULT CALLBACK ILockBytes_UnlockRegion_Proxy(
5210     ILockBytes* This,
5211     ULARGE_INTEGER libOffset,
5212     ULARGE_INTEGER cb,
5213     DWORD dwLockType);
5214 void __RPC_STUB ILockBytes_UnlockRegion_Stub(
5215     struct IRpcStubBuffer* This,
5216     struct IRpcChannelBuffer* pRpcChannelBuffer,
5217     PRPC_MESSAGE pRpcMessage,
5218     DWORD* pdwStubPhase);
5219 HRESULT CALLBACK ILockBytes_Stat_Proxy(
5220     ILockBytes* This,
5221     STATSTG* pstatstg,
5222     DWORD grfStatFlag);
5223 void __RPC_STUB ILockBytes_Stat_Stub(
5224     struct IRpcStubBuffer* This,
5225     struct IRpcChannelBuffer* pRpcChannelBuffer,
5226     PRPC_MESSAGE pRpcMessage,
5227     DWORD* pdwStubPhase);
5228
5229 typedef struct IFillLockBytes IFillLockBytes;
5230 /*****************************************************************************
5231  * IFillLockBytes interface
5232  */
5233 DEFINE_GUID(IID_IFillLockBytes, 0x99caf010, 0x415e, 0x11cf, 0x88,0x14, 0x00,0xaa,0x00,0xb5,0x69,0xf5);
5234 #if defined(__cplusplus) && !defined(CINTERFACE)
5235 struct IFillLockBytes : public IUnknown
5236 {
5237     virtual HRESULT STDMETHODCALLTYPE FillAppend(
5238         const void* pv,
5239         ULONG cb,
5240         ULONG* pcbWritten) = 0;
5241
5242     virtual HRESULT STDMETHODCALLTYPE FillAt(
5243         ULARGE_INTEGER ulOffset,
5244         const void* pv,
5245         ULONG cb,
5246         ULONG* pcbWritten) = 0;
5247
5248     virtual HRESULT STDMETHODCALLTYPE SetFillSize(
5249         ULARGE_INTEGER ulSize) = 0;
5250
5251     virtual HRESULT STDMETHODCALLTYPE Terminate(
5252         BOOL bCanceled) = 0;
5253
5254 };
5255 #else
5256 typedef struct IFillLockBytesVtbl IFillLockBytesVtbl;
5257 struct IFillLockBytes {
5258     const IFillLockBytesVtbl* lpVtbl;
5259 };
5260 struct IFillLockBytesVtbl {
5261     ICOM_MSVTABLE_COMPAT_FIELDS
5262
5263     /*** IUnknown methods ***/
5264     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
5265         IFillLockBytes* This,
5266         REFIID riid,
5267         void** ppvObject);
5268
5269     ULONG (STDMETHODCALLTYPE *AddRef)(
5270         IFillLockBytes* This);
5271
5272     ULONG (STDMETHODCALLTYPE *Release)(
5273         IFillLockBytes* This);
5274
5275     /*** IFillLockBytes methods ***/
5276     HRESULT (STDMETHODCALLTYPE *FillAppend)(
5277         IFillLockBytes* This,
5278         const void* pv,
5279         ULONG cb,
5280         ULONG* pcbWritten);
5281
5282     HRESULT (STDMETHODCALLTYPE *FillAt)(
5283         IFillLockBytes* This,
5284         ULARGE_INTEGER ulOffset,
5285         const void* pv,
5286         ULONG cb,
5287         ULONG* pcbWritten);
5288
5289     HRESULT (STDMETHODCALLTYPE *SetFillSize)(
5290         IFillLockBytes* This,
5291         ULARGE_INTEGER ulSize);
5292
5293     HRESULT (STDMETHODCALLTYPE *Terminate)(
5294         IFillLockBytes* This,
5295         BOOL bCanceled);
5296
5297 };
5298
5299 /*** IUnknown methods ***/
5300 #define IFillLockBytes_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
5301 #define IFillLockBytes_AddRef(p) (p)->lpVtbl->AddRef(p)
5302 #define IFillLockBytes_Release(p) (p)->lpVtbl->Release(p)
5303 /*** IFillLockBytes methods ***/
5304 #define IFillLockBytes_FillAppend(p,a,b,c) (p)->lpVtbl->FillAppend(p,a,b,c)
5305 #define IFillLockBytes_FillAt(p,a,b,c,d) (p)->lpVtbl->FillAt(p,a,b,c,d)
5306 #define IFillLockBytes_SetFillSize(p,a) (p)->lpVtbl->SetFillSize(p,a)
5307 #define IFillLockBytes_Terminate(p,a) (p)->lpVtbl->Terminate(p,a)
5308
5309 #endif
5310
5311 #define IFillLockBytes_METHODS \
5312     ICOM_MSVTABLE_COMPAT_FIELDS \
5313     /*** IUnknown methods ***/ \
5314     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
5315     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
5316     STDMETHOD_(ULONG,Release)(THIS) PURE; \
5317     /*** IFillLockBytes methods ***/ \
5318     STDMETHOD_(HRESULT,FillAppend)(THIS_ const void* pv, ULONG cb, ULONG* pcbWritten) PURE; \
5319     STDMETHOD_(HRESULT,FillAt)(THIS_ ULARGE_INTEGER ulOffset, const void* pv, ULONG cb, ULONG* pcbWritten) PURE; \
5320     STDMETHOD_(HRESULT,SetFillSize)(THIS_ ULARGE_INTEGER ulSize) PURE; \
5321     STDMETHOD_(HRESULT,Terminate)(THIS_ BOOL bCanceled) PURE;
5322
5323 HRESULT CALLBACK IFillLockBytes_RemoteFillAppend_Proxy(
5324     IFillLockBytes* This,
5325     const byte* pv,
5326     ULONG cb,
5327     ULONG* pcbWritten);
5328 void __RPC_STUB IFillLockBytes_RemoteFillAppend_Stub(
5329     struct IRpcStubBuffer* This,
5330     struct IRpcChannelBuffer* pRpcChannelBuffer,
5331     PRPC_MESSAGE pRpcMessage,
5332     DWORD* pdwStubPhase);
5333 HRESULT CALLBACK IFillLockBytes_FillAppend_Proxy(
5334     IFillLockBytes* This,
5335     const void* pv,
5336     ULONG cb,
5337     ULONG* pcbWritten);
5338 HRESULT __RPC_STUB IFillLockBytes_FillAppend_Stub(
5339     IFillLockBytes* This,
5340     const byte* pv,
5341     ULONG cb,
5342     ULONG* pcbWritten);
5343 HRESULT CALLBACK IFillLockBytes_RemoteFillAt_Proxy(
5344     IFillLockBytes* This,
5345     ULARGE_INTEGER ulOffset,
5346     const byte* pv,
5347     ULONG cb,
5348     ULONG* pcbWritten);
5349 void __RPC_STUB IFillLockBytes_RemoteFillAt_Stub(
5350     struct IRpcStubBuffer* This,
5351     struct IRpcChannelBuffer* pRpcChannelBuffer,
5352     PRPC_MESSAGE pRpcMessage,
5353     DWORD* pdwStubPhase);
5354 HRESULT CALLBACK IFillLockBytes_FillAt_Proxy(
5355     IFillLockBytes* This,
5356     ULARGE_INTEGER ulOffset,
5357     const void* pv,
5358     ULONG cb,
5359     ULONG* pcbWritten);
5360 HRESULT __RPC_STUB IFillLockBytes_FillAt_Stub(
5361     IFillLockBytes* This,
5362     ULARGE_INTEGER ulOffset,
5363     const byte* pv,
5364     ULONG cb,
5365     ULONG* pcbWritten);
5366 HRESULT CALLBACK IFillLockBytes_SetFillSize_Proxy(
5367     IFillLockBytes* This,
5368     ULARGE_INTEGER ulSize);
5369 void __RPC_STUB IFillLockBytes_SetFillSize_Stub(
5370     struct IRpcStubBuffer* This,
5371     struct IRpcChannelBuffer* pRpcChannelBuffer,
5372     PRPC_MESSAGE pRpcMessage,
5373     DWORD* pdwStubPhase);
5374 HRESULT CALLBACK IFillLockBytes_Terminate_Proxy(
5375     IFillLockBytes* This,
5376     BOOL bCanceled);
5377 void __RPC_STUB IFillLockBytes_Terminate_Stub(
5378     struct IRpcStubBuffer* This,
5379     struct IRpcChannelBuffer* pRpcChannelBuffer,
5380     PRPC_MESSAGE pRpcMessage,
5381     DWORD* pdwStubPhase);
5382
5383 typedef struct IProgressNotify IProgressNotify;
5384 /*****************************************************************************
5385  * IProgressNotify interface
5386  */
5387 DEFINE_GUID(IID_IProgressNotify, 0xa9d758a0, 0x4617, 0x11cf, 0x95,0xfc, 0x00,0xaa,0x00,0x68,0x0d,0xb4);
5388 #if defined(__cplusplus) && !defined(CINTERFACE)
5389 struct IProgressNotify : public IUnknown
5390 {
5391     virtual HRESULT STDMETHODCALLTYPE OnProgress(
5392         DWORD dwProgressCurrent,
5393         DWORD dwProgressMaximum,
5394         BOOL fAccurate,
5395         BOOL fOwner) = 0;
5396
5397 };
5398 #else
5399 typedef struct IProgressNotifyVtbl IProgressNotifyVtbl;
5400 struct IProgressNotify {
5401     const IProgressNotifyVtbl* lpVtbl;
5402 };
5403 struct IProgressNotifyVtbl {
5404     ICOM_MSVTABLE_COMPAT_FIELDS
5405
5406     /*** IUnknown methods ***/
5407     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
5408         IProgressNotify* This,
5409         REFIID riid,
5410         void** ppvObject);
5411
5412     ULONG (STDMETHODCALLTYPE *AddRef)(
5413         IProgressNotify* This);
5414
5415     ULONG (STDMETHODCALLTYPE *Release)(
5416         IProgressNotify* This);
5417
5418     /*** IProgressNotify methods ***/
5419     HRESULT (STDMETHODCALLTYPE *OnProgress)(
5420         IProgressNotify* This,
5421         DWORD dwProgressCurrent,
5422         DWORD dwProgressMaximum,
5423         BOOL fAccurate,
5424         BOOL fOwner);
5425
5426 };
5427
5428 /*** IUnknown methods ***/
5429 #define IProgressNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
5430 #define IProgressNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
5431 #define IProgressNotify_Release(p) (p)->lpVtbl->Release(p)
5432 /*** IProgressNotify methods ***/
5433 #define IProgressNotify_OnProgress(p,a,b,c,d) (p)->lpVtbl->OnProgress(p,a,b,c,d)
5434
5435 #endif
5436
5437 #define IProgressNotify_METHODS \
5438     ICOM_MSVTABLE_COMPAT_FIELDS \
5439     /*** IUnknown methods ***/ \
5440     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
5441     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
5442     STDMETHOD_(ULONG,Release)(THIS) PURE; \
5443     /*** IProgressNotify methods ***/ \
5444     STDMETHOD_(HRESULT,OnProgress)(THIS_ DWORD dwProgressCurrent, DWORD dwProgressMaximum, BOOL fAccurate, BOOL fOwner) PURE;
5445
5446 HRESULT CALLBACK IProgressNotify_OnProgress_Proxy(
5447     IProgressNotify* This,
5448     DWORD dwProgressCurrent,
5449     DWORD dwProgressMaximum,
5450     BOOL fAccurate,
5451     BOOL fOwner);
5452 void __RPC_STUB IProgressNotify_OnProgress_Stub(
5453     struct IRpcStubBuffer* This,
5454     struct IRpcChannelBuffer* pRpcChannelBuffer,
5455     PRPC_MESSAGE pRpcMessage,
5456     DWORD* pdwStubPhase);
5457
5458 typedef struct ILayoutStorage ILayoutStorage;
5459 typedef struct tagStorageLayout {
5460     DWORD LayoutType;
5461     OLECHAR *pwcsElementName;
5462     LARGE_INTEGER cOffset;
5463     LARGE_INTEGER cBytes;
5464 } StorageLayout;
5465
5466 /*****************************************************************************
5467  * ILayoutStorage interface
5468  */
5469 DEFINE_GUID(IID_ILayoutStorage, 0x0e6d4d90, 0x6738, 0x11cf, 0x96,0x08, 0x00,0xaa,0x00,0x68,0x0d,0xb4);
5470 #if defined(__cplusplus) && !defined(CINTERFACE)
5471 struct ILayoutStorage : public IUnknown
5472 {
5473     virtual HRESULT STDMETHODCALLTYPE LayoutScript(
5474         StorageLayout* pStorageLayout,
5475         DWORD nEntries,
5476         DWORD glfInterleavedFlag) = 0;
5477
5478     virtual HRESULT STDMETHODCALLTYPE BeginMonitor(
5479         ) = 0;
5480
5481     virtual HRESULT STDMETHODCALLTYPE EndMonitor(
5482         ) = 0;
5483
5484     virtual HRESULT STDMETHODCALLTYPE ReLayoutDocfile(
5485         OLECHAR* pwcsNewDfName) = 0;
5486
5487     virtual HRESULT STDMETHODCALLTYPE ReLayoutDocfileOnILockBytes(
5488         ILockBytes* pILockBytes) = 0;
5489
5490 };
5491 #else
5492 typedef struct ILayoutStorageVtbl ILayoutStorageVtbl;
5493 struct ILayoutStorage {
5494     const ILayoutStorageVtbl* lpVtbl;
5495 };
5496 struct ILayoutStorageVtbl {
5497     ICOM_MSVTABLE_COMPAT_FIELDS
5498
5499     /*** IUnknown methods ***/
5500     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
5501         ILayoutStorage* This,
5502         REFIID riid,
5503         void** ppvObject);
5504
5505     ULONG (STDMETHODCALLTYPE *AddRef)(
5506         ILayoutStorage* This);
5507
5508     ULONG (STDMETHODCALLTYPE *Release)(
5509         ILayoutStorage* This);
5510
5511     /*** ILayoutStorage methods ***/
5512     HRESULT (STDMETHODCALLTYPE *LayoutScript)(
5513         ILayoutStorage* This,
5514         StorageLayout* pStorageLayout,
5515         DWORD nEntries,
5516         DWORD glfInterleavedFlag);
5517
5518     HRESULT (STDMETHODCALLTYPE *BeginMonitor)(
5519         ILayoutStorage* This);
5520
5521     HRESULT (STDMETHODCALLTYPE *EndMonitor)(
5522         ILayoutStorage* This);
5523
5524     HRESULT (STDMETHODCALLTYPE *ReLayoutDocfile)(
5525         ILayoutStorage* This,
5526         OLECHAR* pwcsNewDfName);
5527
5528     HRESULT (STDMETHODCALLTYPE *ReLayoutDocfileOnILockBytes)(
5529         ILayoutStorage* This,
5530         ILockBytes* pILockBytes);
5531
5532 };
5533
5534 /*** IUnknown methods ***/
5535 #define ILayoutStorage_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
5536 #define ILayoutStorage_AddRef(p) (p)->lpVtbl->AddRef(p)
5537 #define ILayoutStorage_Release(p) (p)->lpVtbl->Release(p)
5538 /*** ILayoutStorage methods ***/
5539 #define ILayoutStorage_LayoutScript(p,a,b,c) (p)->lpVtbl->LayoutScript(p,a,b,c)
5540 #define ILayoutStorage_BeginMonitor(p) (p)->lpVtbl->BeginMonitor(p)
5541 #define ILayoutStorage_EndMonitor(p) (p)->lpVtbl->EndMonitor(p)
5542 #define ILayoutStorage_ReLayoutDocfile(p,a) (p)->lpVtbl->ReLayoutDocfile(p,a)
5543 #define ILayoutStorage_ReLayoutDocfileOnILockBytes(p,a) (p)->lpVtbl->ReLayoutDocfileOnILockBytes(p,a)
5544
5545 #endif
5546
5547 #define ILayoutStorage_METHODS \
5548     ICOM_MSVTABLE_COMPAT_FIELDS \
5549     /*** IUnknown methods ***/ \
5550     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
5551     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
5552     STDMETHOD_(ULONG,Release)(THIS) PURE; \
5553     /*** ILayoutStorage methods ***/ \
5554     STDMETHOD_(HRESULT,LayoutScript)(THIS_ StorageLayout* pStorageLayout, DWORD nEntries, DWORD glfInterleavedFlag) PURE; \
5555     STDMETHOD_(HRESULT,BeginMonitor)(THIS) PURE; \
5556     STDMETHOD_(HRESULT,EndMonitor)(THIS) PURE; \
5557     STDMETHOD_(HRESULT,ReLayoutDocfile)(THIS_ OLECHAR* pwcsNewDfName) PURE; \
5558     STDMETHOD_(HRESULT,ReLayoutDocfileOnILockBytes)(THIS_ ILockBytes* pILockBytes) PURE;
5559
5560 HRESULT CALLBACK ILayoutStorage_LayoutScript_Proxy(
5561     ILayoutStorage* This,
5562     StorageLayout* pStorageLayout,
5563     DWORD nEntries,
5564     DWORD glfInterleavedFlag);
5565 void __RPC_STUB ILayoutStorage_LayoutScript_Stub(
5566     struct IRpcStubBuffer* This,
5567     struct IRpcChannelBuffer* pRpcChannelBuffer,
5568     PRPC_MESSAGE pRpcMessage,
5569     DWORD* pdwStubPhase);
5570 HRESULT CALLBACK ILayoutStorage_BeginMonitor_Proxy(
5571     ILayoutStorage* This);
5572 void __RPC_STUB ILayoutStorage_BeginMonitor_Stub(
5573     struct IRpcStubBuffer* This,
5574     struct IRpcChannelBuffer* pRpcChannelBuffer,
5575     PRPC_MESSAGE pRpcMessage,
5576     DWORD* pdwStubPhase);
5577 HRESULT CALLBACK ILayoutStorage_EndMonitor_Proxy(
5578     ILayoutStorage* This);
5579 void __RPC_STUB ILayoutStorage_EndMonitor_Stub(
5580     struct IRpcStubBuffer* This,
5581     struct IRpcChannelBuffer* pRpcChannelBuffer,
5582     PRPC_MESSAGE pRpcMessage,
5583     DWORD* pdwStubPhase);
5584 HRESULT CALLBACK ILayoutStorage_ReLayoutDocfile_Proxy(
5585     ILayoutStorage* This,
5586     OLECHAR* pwcsNewDfName);
5587 void __RPC_STUB ILayoutStorage_ReLayoutDocfile_Stub(
5588     struct IRpcStubBuffer* This,
5589     struct IRpcChannelBuffer* pRpcChannelBuffer,
5590     PRPC_MESSAGE pRpcMessage,
5591     DWORD* pdwStubPhase);
5592 HRESULT CALLBACK ILayoutStorage_ReLayoutDocfileOnILockBytes_Proxy(
5593     ILayoutStorage* This,
5594     ILockBytes* pILockBytes);
5595 void __RPC_STUB ILayoutStorage_ReLayoutDocfileOnILockBytes_Stub(
5596     struct IRpcStubBuffer* This,
5597     struct IRpcChannelBuffer* pRpcChannelBuffer,
5598     PRPC_MESSAGE pRpcMessage,
5599     DWORD* pdwStubPhase);
5600
5601 typedef struct IEnumFORMATETC IEnumFORMATETC;
5602 typedef IEnumFORMATETC *LPENUMFORMATETC;
5603
5604 typedef struct tagDVTARGETDEVICE {
5605     DWORD tdSize;
5606     WORD tdDriverNameOffset;
5607     WORD tdDeviceNameOffset;
5608     WORD tdPortNameOffset;
5609     WORD tdExtDevmodeOffset;
5610     BYTE tdData[1];
5611 } DVTARGETDEVICE;
5612
5613 typedef CLIPFORMAT *LPCLIPFORMAT;
5614
5615 typedef struct tagFORMATETC {
5616     CLIPFORMAT cfFormat;
5617     DVTARGETDEVICE *ptd;
5618     DWORD dwAspect;
5619     LONG lindex;
5620     DWORD tymed;
5621 } FORMATETC, *LPFORMATETC;
5622
5623 /*****************************************************************************
5624  * IEnumFORMATETC interface
5625  */
5626 DEFINE_GUID(IID_IEnumFORMATETC, 0x00000103, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
5627 #if defined(__cplusplus) && !defined(CINTERFACE)
5628 struct IEnumFORMATETC : public IUnknown
5629 {
5630     virtual HRESULT STDMETHODCALLTYPE Next(
5631         ULONG celt,
5632         FORMATETC* rgelt,
5633         ULONG* pceltFetched) = 0;
5634
5635     virtual HRESULT STDMETHODCALLTYPE Skip(
5636         ULONG celt) = 0;
5637
5638     virtual HRESULT STDMETHODCALLTYPE Reset(
5639         ) = 0;
5640
5641     virtual HRESULT STDMETHODCALLTYPE Clone(
5642         IEnumFORMATETC** ppenum) = 0;
5643
5644 };
5645 #else
5646 typedef struct IEnumFORMATETCVtbl IEnumFORMATETCVtbl;
5647 struct IEnumFORMATETC {
5648     const IEnumFORMATETCVtbl* lpVtbl;
5649 };
5650 struct IEnumFORMATETCVtbl {
5651     ICOM_MSVTABLE_COMPAT_FIELDS
5652
5653     /*** IUnknown methods ***/
5654     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
5655         IEnumFORMATETC* This,
5656         REFIID riid,
5657         void** ppvObject);
5658
5659     ULONG (STDMETHODCALLTYPE *AddRef)(
5660         IEnumFORMATETC* This);
5661
5662     ULONG (STDMETHODCALLTYPE *Release)(
5663         IEnumFORMATETC* This);
5664
5665     /*** IEnumFORMATETC methods ***/
5666     HRESULT (STDMETHODCALLTYPE *Next)(
5667         IEnumFORMATETC* This,
5668         ULONG celt,
5669         FORMATETC* rgelt,
5670         ULONG* pceltFetched);
5671
5672     HRESULT (STDMETHODCALLTYPE *Skip)(
5673         IEnumFORMATETC* This,
5674         ULONG celt);
5675
5676     HRESULT (STDMETHODCALLTYPE *Reset)(
5677         IEnumFORMATETC* This);
5678
5679     HRESULT (STDMETHODCALLTYPE *Clone)(
5680         IEnumFORMATETC* This,
5681         IEnumFORMATETC** ppenum);
5682
5683 };
5684
5685 /*** IUnknown methods ***/
5686 #define IEnumFORMATETC_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
5687 #define IEnumFORMATETC_AddRef(p) (p)->lpVtbl->AddRef(p)
5688 #define IEnumFORMATETC_Release(p) (p)->lpVtbl->Release(p)
5689 /*** IEnumFORMATETC methods ***/
5690 #define IEnumFORMATETC_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
5691 #define IEnumFORMATETC_Skip(p,a) (p)->lpVtbl->Skip(p,a)
5692 #define IEnumFORMATETC_Reset(p) (p)->lpVtbl->Reset(p)
5693 #define IEnumFORMATETC_Clone(p,a) (p)->lpVtbl->Clone(p,a)
5694
5695 #endif
5696
5697 #define IEnumFORMATETC_METHODS \
5698     ICOM_MSVTABLE_COMPAT_FIELDS \
5699     /*** IUnknown methods ***/ \
5700     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
5701     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
5702     STDMETHOD_(ULONG,Release)(THIS) PURE; \
5703     /*** IEnumFORMATETC methods ***/ \
5704     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, FORMATETC* rgelt, ULONG* pceltFetched) PURE; \
5705     STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
5706     STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
5707     STDMETHOD_(HRESULT,Clone)(THIS_ IEnumFORMATETC** ppenum) PURE;
5708
5709 HRESULT CALLBACK IEnumFORMATETC_RemoteNext_Proxy(
5710     IEnumFORMATETC* This,
5711     ULONG celt,
5712     FORMATETC* rgelt,
5713     ULONG* pceltFetched);
5714 void __RPC_STUB IEnumFORMATETC_RemoteNext_Stub(
5715     struct IRpcStubBuffer* This,
5716     struct IRpcChannelBuffer* pRpcChannelBuffer,
5717     PRPC_MESSAGE pRpcMessage,
5718     DWORD* pdwStubPhase);
5719 HRESULT CALLBACK IEnumFORMATETC_Next_Proxy(
5720     IEnumFORMATETC* This,
5721     ULONG celt,
5722     FORMATETC* rgelt,
5723     ULONG* pceltFetched);
5724 HRESULT __RPC_STUB IEnumFORMATETC_Next_Stub(
5725     IEnumFORMATETC* This,
5726     ULONG celt,
5727     FORMATETC* rgelt,
5728     ULONG* pceltFetched);
5729 HRESULT CALLBACK IEnumFORMATETC_Skip_Proxy(
5730     IEnumFORMATETC* This,
5731     ULONG celt);
5732 void __RPC_STUB IEnumFORMATETC_Skip_Stub(
5733     struct IRpcStubBuffer* This,
5734     struct IRpcChannelBuffer* pRpcChannelBuffer,
5735     PRPC_MESSAGE pRpcMessage,
5736     DWORD* pdwStubPhase);
5737 HRESULT CALLBACK IEnumFORMATETC_Reset_Proxy(
5738     IEnumFORMATETC* This);
5739 void __RPC_STUB IEnumFORMATETC_Reset_Stub(
5740     struct IRpcStubBuffer* This,
5741     struct IRpcChannelBuffer* pRpcChannelBuffer,
5742     PRPC_MESSAGE pRpcMessage,
5743     DWORD* pdwStubPhase);
5744 HRESULT CALLBACK IEnumFORMATETC_Clone_Proxy(
5745     IEnumFORMATETC* This,
5746     IEnumFORMATETC** ppenum);
5747 void __RPC_STUB IEnumFORMATETC_Clone_Stub(
5748     struct IRpcStubBuffer* This,
5749     struct IRpcChannelBuffer* pRpcChannelBuffer,
5750     PRPC_MESSAGE pRpcMessage,
5751     DWORD* pdwStubPhase);
5752
5753 typedef struct IEnumSTATDATA IEnumSTATDATA;
5754 typedef IEnumSTATDATA *LPENUMSTATDATA;
5755
5756 typedef enum tagADVF {
5757     ADVF_NODATA = 1,
5758     ADVF_PRIMEFIRST = 2,
5759     ADVF_ONLYONCE = 4,
5760     ADVF_DATAONSTOP = 64,
5761     ADVFCACHE_NOHANDLER = 8,
5762     ADVFCACHE_FORCEBUILTIN = 16,
5763     ADVFCACHE_ONSAVE = 32
5764 } ADVF;
5765
5766 typedef struct tagSTATDATA {
5767     FORMATETC formatetc;
5768     DWORD advf;
5769     IAdviseSink *pAdvSink;
5770     DWORD dwConnection;
5771 } STATDATA, *LPSTATDATA;
5772
5773 /*****************************************************************************
5774  * IEnumSTATDATA interface
5775  */
5776 DEFINE_GUID(IID_IEnumSTATDATA, 0x00000105, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
5777 #if defined(__cplusplus) && !defined(CINTERFACE)
5778 struct IEnumSTATDATA : public IUnknown
5779 {
5780     virtual HRESULT STDMETHODCALLTYPE Next(
5781         ULONG celt,
5782         STATDATA* rgelt,
5783         ULONG* pceltFetched) = 0;
5784
5785     virtual HRESULT STDMETHODCALLTYPE Skip(
5786         ULONG celt) = 0;
5787
5788     virtual HRESULT STDMETHODCALLTYPE Reset(
5789         ) = 0;
5790
5791     virtual HRESULT STDMETHODCALLTYPE Clone(
5792         IEnumSTATDATA** ppenum) = 0;
5793
5794 };
5795 #else
5796 typedef struct IEnumSTATDATAVtbl IEnumSTATDATAVtbl;
5797 struct IEnumSTATDATA {
5798     const IEnumSTATDATAVtbl* lpVtbl;
5799 };
5800 struct IEnumSTATDATAVtbl {
5801     ICOM_MSVTABLE_COMPAT_FIELDS
5802
5803     /*** IUnknown methods ***/
5804     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
5805         IEnumSTATDATA* This,
5806         REFIID riid,
5807         void** ppvObject);
5808
5809     ULONG (STDMETHODCALLTYPE *AddRef)(
5810         IEnumSTATDATA* This);
5811
5812     ULONG (STDMETHODCALLTYPE *Release)(
5813         IEnumSTATDATA* This);
5814
5815     /*** IEnumSTATDATA methods ***/
5816     HRESULT (STDMETHODCALLTYPE *Next)(
5817         IEnumSTATDATA* This,
5818         ULONG celt,
5819         STATDATA* rgelt,
5820         ULONG* pceltFetched);
5821
5822     HRESULT (STDMETHODCALLTYPE *Skip)(
5823         IEnumSTATDATA* This,
5824         ULONG celt);
5825
5826     HRESULT (STDMETHODCALLTYPE *Reset)(
5827         IEnumSTATDATA* This);
5828
5829     HRESULT (STDMETHODCALLTYPE *Clone)(
5830         IEnumSTATDATA* This,
5831         IEnumSTATDATA** ppenum);
5832
5833 };
5834
5835 /*** IUnknown methods ***/
5836 #define IEnumSTATDATA_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
5837 #define IEnumSTATDATA_AddRef(p) (p)->lpVtbl->AddRef(p)
5838 #define IEnumSTATDATA_Release(p) (p)->lpVtbl->Release(p)
5839 /*** IEnumSTATDATA methods ***/
5840 #define IEnumSTATDATA_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
5841 #define IEnumSTATDATA_Skip(p,a) (p)->lpVtbl->Skip(p,a)
5842 #define IEnumSTATDATA_Reset(p) (p)->lpVtbl->Reset(p)
5843 #define IEnumSTATDATA_Clone(p,a) (p)->lpVtbl->Clone(p,a)
5844
5845 #endif
5846
5847 #define IEnumSTATDATA_METHODS \
5848     ICOM_MSVTABLE_COMPAT_FIELDS \
5849     /*** IUnknown methods ***/ \
5850     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
5851     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
5852     STDMETHOD_(ULONG,Release)(THIS) PURE; \
5853     /*** IEnumSTATDATA methods ***/ \
5854     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, STATDATA* rgelt, ULONG* pceltFetched) PURE; \
5855     STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
5856     STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
5857     STDMETHOD_(HRESULT,Clone)(THIS_ IEnumSTATDATA** ppenum) PURE;
5858
5859 HRESULT CALLBACK IEnumSTATDATA_RemoteNext_Proxy(
5860     IEnumSTATDATA* This,
5861     ULONG celt,
5862     STATDATA* rgelt,
5863     ULONG* pceltFetched);
5864 void __RPC_STUB IEnumSTATDATA_RemoteNext_Stub(
5865     struct IRpcStubBuffer* This,
5866     struct IRpcChannelBuffer* pRpcChannelBuffer,
5867     PRPC_MESSAGE pRpcMessage,
5868     DWORD* pdwStubPhase);
5869 HRESULT CALLBACK IEnumSTATDATA_Next_Proxy(
5870     IEnumSTATDATA* This,
5871     ULONG celt,
5872     STATDATA* rgelt,
5873     ULONG* pceltFetched);
5874 HRESULT __RPC_STUB IEnumSTATDATA_Next_Stub(
5875     IEnumSTATDATA* This,
5876     ULONG celt,
5877     STATDATA* rgelt,
5878     ULONG* pceltFetched);
5879 HRESULT CALLBACK IEnumSTATDATA_Skip_Proxy(
5880     IEnumSTATDATA* This,
5881     ULONG celt);
5882 void __RPC_STUB IEnumSTATDATA_Skip_Stub(
5883     struct IRpcStubBuffer* This,
5884     struct IRpcChannelBuffer* pRpcChannelBuffer,
5885     PRPC_MESSAGE pRpcMessage,
5886     DWORD* pdwStubPhase);
5887 HRESULT CALLBACK IEnumSTATDATA_Reset_Proxy(
5888     IEnumSTATDATA* This);
5889 void __RPC_STUB IEnumSTATDATA_Reset_Stub(
5890     struct IRpcStubBuffer* This,
5891     struct IRpcChannelBuffer* pRpcChannelBuffer,
5892     PRPC_MESSAGE pRpcMessage,
5893     DWORD* pdwStubPhase);
5894 HRESULT CALLBACK IEnumSTATDATA_Clone_Proxy(
5895     IEnumSTATDATA* This,
5896     IEnumSTATDATA** ppenum);
5897 void __RPC_STUB IEnumSTATDATA_Clone_Stub(
5898     struct IRpcStubBuffer* This,
5899     struct IRpcChannelBuffer* pRpcChannelBuffer,
5900     PRPC_MESSAGE pRpcMessage,
5901     DWORD* pdwStubPhase);
5902
5903 typedef IAdviseSink *LPADVISESINK;
5904
5905 typedef enum tagTYMED {
5906     TYMED_HGLOBAL = 1,
5907     TYMED_FILE = 2,
5908     TYMED_ISTREAM = 4,
5909     TYMED_ISTORAGE = 8,
5910     TYMED_GDI = 16,
5911     TYMED_MFPICT = 32,
5912     TYMED_ENHMF = 64,
5913     TYMED_NULL = 0
5914 } TYMED;
5915
5916 typedef struct tagRemSTGMEDIUM {
5917     DWORD tymed;
5918     DWORD dwHandleType;
5919     unsigned long pData;
5920     unsigned long pUnkForRelease;
5921     unsigned long cbData;
5922     byte data[1];
5923 } RemSTGMEDIUM;
5924
5925 typedef struct tagSTGMEDIUM {
5926     DWORD tymed;
5927     union {
5928         HBITMAP hBitmap;
5929         HMETAFILEPICT hMetaFilePict;
5930         HENHMETAFILE hEnhMetaFile;
5931         HGLOBAL hGlobal;
5932         LPOLESTR lpszFileName;
5933         IStream *pstm;
5934         IStorage *pstg;
5935     } DUMMYUNIONNAME;
5936     IUnknown *pUnkForRelease;
5937 } uSTGMEDIUM;
5938
5939 typedef struct _GDI_OBJECT {
5940     DWORD ObjectType;
5941     union {
5942         wireHBITMAP hBitmap;
5943         wireHPALETTE hPalette;
5944         wireHGLOBAL hGeneric;
5945     } u;
5946 } GDI_OBJECT;
5947
5948 typedef struct _userSTGMEDIUM {
5949     struct _STGMEDIUM_UNION {
5950         DWORD tymed;
5951         union {
5952             wireHMETAFILEPICT hMetaFilePict;
5953             wireHENHMETAFILE hHEnhMetaFile;
5954             GDI_OBJECT *hGdiHandle;
5955             wireHGLOBAL hGlobal;
5956             LPOLESTR lpszFileName;
5957             BYTE_BLOB *pstm;
5958             BYTE_BLOB *pstg;
5959         } u;
5960     } DUMMYSTRUCTNAME;
5961     IUnknown *pUnkForRelease;
5962 } userSTGMEDIUM;
5963
5964 typedef userSTGMEDIUM *wireSTGMEDIUM;
5965
5966 typedef uSTGMEDIUM STGMEDIUM;
5967 unsigned long   __RPC_USER STGMEDIUM_UserSize     (unsigned long *, unsigned long,   STGMEDIUM *);
5968 unsigned char * __RPC_USER STGMEDIUM_UserMarshal  (unsigned long *, unsigned char *, STGMEDIUM *);
5969 unsigned char * __RPC_USER STGMEDIUM_UserUnmarshal(unsigned long *, unsigned char *, STGMEDIUM *);
5970 void            __RPC_USER STGMEDIUM_UserFree     (unsigned long *, STGMEDIUM *);
5971
5972 typedef userSTGMEDIUM *wireASYNC_STGMEDIUM;
5973
5974 typedef STGMEDIUM ASYNC_STGMEDIUM;
5975 unsigned long   __RPC_USER ASYNC_STGMEDIUM_UserSize     (unsigned long *, unsigned long,   ASYNC_STGMEDIUM *);
5976 unsigned char * __RPC_USER ASYNC_STGMEDIUM_UserMarshal  (unsigned long *, unsigned char *, ASYNC_STGMEDIUM *);
5977 unsigned char * __RPC_USER ASYNC_STGMEDIUM_UserUnmarshal(unsigned long *, unsigned char *, ASYNC_STGMEDIUM *);
5978 void            __RPC_USER ASYNC_STGMEDIUM_UserFree     (unsigned long *, ASYNC_STGMEDIUM *);
5979
5980 typedef STGMEDIUM *LPSTGMEDIUM;
5981
5982 typedef struct _userFLAG_STGMEDIUM {
5983     long ContextFlags;
5984     long fPassOwnership;
5985     userSTGMEDIUM Stgmed;
5986 } userFLAG_STGMEDIUM;
5987
5988 typedef userFLAG_STGMEDIUM *wireFLAG_STGMEDIUM;
5989
5990 typedef struct _FLAG_STGMEDIUM {
5991     long ContextFlags;
5992     long fPassOwnership;
5993     STGMEDIUM Stgmed;
5994 } FLAG_STGMEDIUM;
5995 unsigned long   __RPC_USER FLAG_STGMEDIUM_UserSize     (unsigned long *, unsigned long,   FLAG_STGMEDIUM *);
5996 unsigned char * __RPC_USER FLAG_STGMEDIUM_UserMarshal  (unsigned long *, unsigned char *, FLAG_STGMEDIUM *);
5997 unsigned char * __RPC_USER FLAG_STGMEDIUM_UserUnmarshal(unsigned long *, unsigned char *, FLAG_STGMEDIUM *);
5998 void            __RPC_USER FLAG_STGMEDIUM_UserFree     (unsigned long *, FLAG_STGMEDIUM *);
5999
6000 /*****************************************************************************
6001  * IAdviseSink interface
6002  */
6003 DEFINE_GUID(IID_IAdviseSink, 0x0000010f, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
6004 #if defined(__cplusplus) && !defined(CINTERFACE)
6005 struct IAdviseSink : public IUnknown
6006 {
6007     virtual void STDMETHODCALLTYPE OnDataChange(
6008         FORMATETC* pFormatetc,
6009         STGMEDIUM* pStgmed) = 0;
6010
6011     virtual void STDMETHODCALLTYPE OnViewChange(
6012         DWORD dwAspect,
6013         LONG lindex) = 0;
6014
6015     virtual void STDMETHODCALLTYPE OnRename(
6016         IMoniker* pmk) = 0;
6017
6018     virtual void STDMETHODCALLTYPE OnSave(
6019         ) = 0;
6020
6021     virtual void STDMETHODCALLTYPE OnClose(
6022         ) = 0;
6023
6024 };
6025 #else
6026 typedef struct IAdviseSinkVtbl IAdviseSinkVtbl;
6027 struct IAdviseSink {
6028     const IAdviseSinkVtbl* lpVtbl;
6029 };
6030 struct IAdviseSinkVtbl {
6031     ICOM_MSVTABLE_COMPAT_FIELDS
6032
6033     /*** IUnknown methods ***/
6034     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
6035         IAdviseSink* This,
6036         REFIID riid,
6037         void** ppvObject);
6038
6039     ULONG (STDMETHODCALLTYPE *AddRef)(
6040         IAdviseSink* This);
6041
6042     ULONG (STDMETHODCALLTYPE *Release)(
6043         IAdviseSink* This);
6044
6045     /*** IAdviseSink methods ***/
6046     void (STDMETHODCALLTYPE *OnDataChange)(
6047         IAdviseSink* This,
6048         FORMATETC* pFormatetc,
6049         STGMEDIUM* pStgmed);
6050
6051     void (STDMETHODCALLTYPE *OnViewChange)(
6052         IAdviseSink* This,
6053         DWORD dwAspect,
6054         LONG lindex);
6055
6056     void (STDMETHODCALLTYPE *OnRename)(
6057         IAdviseSink* This,
6058         IMoniker* pmk);
6059
6060     void (STDMETHODCALLTYPE *OnSave)(
6061         IAdviseSink* This);
6062
6063     void (STDMETHODCALLTYPE *OnClose)(
6064         IAdviseSink* This);
6065
6066 };
6067
6068 /*** IUnknown methods ***/
6069 #define IAdviseSink_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
6070 #define IAdviseSink_AddRef(p) (p)->lpVtbl->AddRef(p)
6071 #define IAdviseSink_Release(p) (p)->lpVtbl->Release(p)
6072 /*** IAdviseSink methods ***/
6073 #define IAdviseSink_OnDataChange(p,a,b) (p)->lpVtbl->OnDataChange(p,a,b)
6074 #define IAdviseSink_OnViewChange(p,a,b) (p)->lpVtbl->OnViewChange(p,a,b)
6075 #define IAdviseSink_OnRename(p,a) (p)->lpVtbl->OnRename(p,a)
6076 #define IAdviseSink_OnSave(p) (p)->lpVtbl->OnSave(p)
6077 #define IAdviseSink_OnClose(p) (p)->lpVtbl->OnClose(p)
6078
6079 #endif
6080
6081 #define IAdviseSink_METHODS \
6082     ICOM_MSVTABLE_COMPAT_FIELDS \
6083     /*** IUnknown methods ***/ \
6084     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
6085     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
6086     STDMETHOD_(ULONG,Release)(THIS) PURE; \
6087     /*** IAdviseSink methods ***/ \
6088     STDMETHOD_(void,OnDataChange)(THIS_ FORMATETC* pFormatetc, STGMEDIUM* pStgmed) PURE; \
6089     STDMETHOD_(void,OnViewChange)(THIS_ DWORD dwAspect, LONG lindex) PURE; \
6090     STDMETHOD_(void,OnRename)(THIS_ IMoniker* pmk) PURE; \
6091     STDMETHOD_(void,OnSave)(THIS) PURE; \
6092     STDMETHOD_(void,OnClose)(THIS) PURE;
6093
6094 HRESULT CALLBACK IAdviseSink_RemoteOnDataChange_Proxy(
6095     IAdviseSink* This,
6096     IAsyncManager** ppIAM,
6097     FORMATETC* pFormatetc,
6098     ASYNC_STGMEDIUM* pStgmed);
6099 void __RPC_STUB IAdviseSink_RemoteOnDataChange_Stub(
6100     struct IRpcStubBuffer* This,
6101     struct IRpcChannelBuffer* pRpcChannelBuffer,
6102     PRPC_MESSAGE pRpcMessage,
6103     DWORD* pdwStubPhase);
6104 void CALLBACK IAdviseSink_OnDataChange_Proxy(
6105     IAdviseSink* This,
6106     FORMATETC* pFormatetc,
6107     STGMEDIUM* pStgmed);
6108 HRESULT __RPC_STUB IAdviseSink_OnDataChange_Stub(
6109     IAdviseSink* This,
6110     IAsyncManager** ppIAM,
6111     FORMATETC* pFormatetc,
6112     ASYNC_STGMEDIUM* pStgmed);
6113 HRESULT CALLBACK IAdviseSink_RemoteOnViewChange_Proxy(
6114     IAdviseSink* This,
6115     IAsyncManager** ppIAM,
6116     DWORD dwAspect,
6117     LONG lindex);
6118 void __RPC_STUB IAdviseSink_RemoteOnViewChange_Stub(
6119     struct IRpcStubBuffer* This,
6120     struct IRpcChannelBuffer* pRpcChannelBuffer,
6121     PRPC_MESSAGE pRpcMessage,
6122     DWORD* pdwStubPhase);
6123 void CALLBACK IAdviseSink_OnViewChange_Proxy(
6124     IAdviseSink* This,
6125     DWORD dwAspect,
6126     LONG lindex);
6127 HRESULT __RPC_STUB IAdviseSink_OnViewChange_Stub(
6128     IAdviseSink* This,
6129     IAsyncManager** ppIAM,
6130     DWORD dwAspect,
6131     LONG lindex);
6132 HRESULT CALLBACK IAdviseSink_RemoteOnRename_Proxy(
6133     IAdviseSink* This,
6134     IAsyncManager** ppIAM,
6135     IMoniker* pmk);
6136 void __RPC_STUB IAdviseSink_RemoteOnRename_Stub(
6137     struct IRpcStubBuffer* This,
6138     struct IRpcChannelBuffer* pRpcChannelBuffer,
6139     PRPC_MESSAGE pRpcMessage,
6140     DWORD* pdwStubPhase);
6141 void CALLBACK IAdviseSink_OnRename_Proxy(
6142     IAdviseSink* This,
6143     IMoniker* pmk);
6144 HRESULT __RPC_STUB IAdviseSink_OnRename_Stub(
6145     IAdviseSink* This,
6146     IAsyncManager** ppIAM,
6147     IMoniker* pmk);
6148 HRESULT CALLBACK IAdviseSink_RemoteOnSave_Proxy(
6149     IAdviseSink* This,
6150     IAsyncManager** ppIAM);
6151 void __RPC_STUB IAdviseSink_RemoteOnSave_Stub(
6152     struct IRpcStubBuffer* This,
6153     struct IRpcChannelBuffer* pRpcChannelBuffer,
6154     PRPC_MESSAGE pRpcMessage,
6155     DWORD* pdwStubPhase);
6156 void CALLBACK IAdviseSink_OnSave_Proxy(
6157     IAdviseSink* This);
6158 HRESULT __RPC_STUB IAdviseSink_OnSave_Stub(
6159     IAdviseSink* This,
6160     IAsyncManager** ppIAM);
6161 HRESULT CALLBACK IAdviseSink_RemoteOnClose_Proxy(
6162     IAdviseSink* This);
6163 void __RPC_STUB IAdviseSink_RemoteOnClose_Stub(
6164     struct IRpcStubBuffer* This,
6165     struct IRpcChannelBuffer* pRpcChannelBuffer,
6166     PRPC_MESSAGE pRpcMessage,
6167     DWORD* pdwStubPhase);
6168 void CALLBACK IAdviseSink_OnClose_Proxy(
6169     IAdviseSink* This);
6170 HRESULT __RPC_STUB IAdviseSink_OnClose_Stub(
6171     IAdviseSink* This);
6172
6173 typedef struct IAdviseSink2 IAdviseSink2;
6174 typedef IAdviseSink2 *LPADVISESINK2;
6175
6176 /*****************************************************************************
6177  * IAdviseSink2 interface
6178  */
6179 DEFINE_GUID(IID_IAdviseSink2, 0x00000125, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
6180 #if defined(__cplusplus) && !defined(CINTERFACE)
6181 struct IAdviseSink2 : public IAdviseSink
6182 {
6183     virtual void STDMETHODCALLTYPE OnLinkSrcChange(
6184         IMoniker* pmk) = 0;
6185
6186 };
6187 #else
6188 typedef struct IAdviseSink2Vtbl IAdviseSink2Vtbl;
6189 struct IAdviseSink2 {
6190     const IAdviseSink2Vtbl* lpVtbl;
6191 };
6192 struct IAdviseSink2Vtbl {
6193     ICOM_MSVTABLE_COMPAT_FIELDS
6194
6195     /*** IUnknown methods ***/
6196     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
6197         IAdviseSink2* This,
6198         REFIID riid,
6199         void** ppvObject);
6200
6201     ULONG (STDMETHODCALLTYPE *AddRef)(
6202         IAdviseSink2* This);
6203
6204     ULONG (STDMETHODCALLTYPE *Release)(
6205         IAdviseSink2* This);
6206
6207     /*** IAdviseSink methods ***/
6208     void (STDMETHODCALLTYPE *OnDataChange)(
6209         IAdviseSink2* This,
6210         FORMATETC* pFormatetc,
6211         STGMEDIUM* pStgmed);
6212
6213     void (STDMETHODCALLTYPE *OnViewChange)(
6214         IAdviseSink2* This,
6215         DWORD dwAspect,
6216         LONG lindex);
6217
6218     void (STDMETHODCALLTYPE *OnRename)(
6219         IAdviseSink2* This,
6220         IMoniker* pmk);
6221
6222     void (STDMETHODCALLTYPE *OnSave)(
6223         IAdviseSink2* This);
6224
6225     void (STDMETHODCALLTYPE *OnClose)(
6226         IAdviseSink2* This);
6227
6228     /*** IAdviseSink2 methods ***/
6229     void (STDMETHODCALLTYPE *OnLinkSrcChange)(
6230         IAdviseSink2* This,
6231         IMoniker* pmk);
6232
6233 };
6234
6235 /*** IUnknown methods ***/
6236 #define IAdviseSink2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
6237 #define IAdviseSink2_AddRef(p) (p)->lpVtbl->AddRef(p)
6238 #define IAdviseSink2_Release(p) (p)->lpVtbl->Release(p)
6239 /*** IAdviseSink methods ***/
6240 #define IAdviseSink2_OnDataChange(p,a,b) (p)->lpVtbl->OnDataChange(p,a,b)
6241 #define IAdviseSink2_OnViewChange(p,a,b) (p)->lpVtbl->OnViewChange(p,a,b)
6242 #define IAdviseSink2_OnRename(p,a) (p)->lpVtbl->OnRename(p,a)
6243 #define IAdviseSink2_OnSave(p) (p)->lpVtbl->OnSave(p)
6244 #define IAdviseSink2_OnClose(p) (p)->lpVtbl->OnClose(p)
6245 /*** IAdviseSink2 methods ***/
6246 #define IAdviseSink2_OnLinkSrcChange(p,a) (p)->lpVtbl->OnLinkSrcChange(p,a)
6247
6248 #endif
6249
6250 #define IAdviseSink2_METHODS \
6251     ICOM_MSVTABLE_COMPAT_FIELDS \
6252     /*** IUnknown methods ***/ \
6253     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
6254     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
6255     STDMETHOD_(ULONG,Release)(THIS) PURE; \
6256     /*** IAdviseSink methods ***/ \
6257     STDMETHOD_(void,OnDataChange)(THIS_ FORMATETC* pFormatetc, STGMEDIUM* pStgmed) PURE; \
6258     STDMETHOD_(void,OnViewChange)(THIS_ DWORD dwAspect, LONG lindex) PURE; \
6259     STDMETHOD_(void,OnRename)(THIS_ IMoniker* pmk) PURE; \
6260     STDMETHOD_(void,OnSave)(THIS) PURE; \
6261     STDMETHOD_(void,OnClose)(THIS) PURE; \
6262     /*** IAdviseSink2 methods ***/ \
6263     STDMETHOD_(void,OnLinkSrcChange)(THIS_ IMoniker* pmk) PURE;
6264
6265 HRESULT CALLBACK IAdviseSink2_RemoteOnLinkSrcChange_Proxy(
6266     IAdviseSink2* This,
6267     IAsyncManager** ppIAM,
6268     IMoniker* pmk);
6269 void __RPC_STUB IAdviseSink2_RemoteOnLinkSrcChange_Stub(
6270     struct IRpcStubBuffer* This,
6271     struct IRpcChannelBuffer* pRpcChannelBuffer,
6272     PRPC_MESSAGE pRpcMessage,
6273     DWORD* pdwStubPhase);
6274 void CALLBACK IAdviseSink2_OnLinkSrcChange_Proxy(
6275     IAdviseSink2* This,
6276     IMoniker* pmk);
6277 HRESULT __RPC_STUB IAdviseSink2_OnLinkSrcChange_Stub(
6278     IAdviseSink2* This,
6279     IAsyncManager** ppIAM,
6280     IMoniker* pmk);
6281
6282 typedef struct IDataObject IDataObject;
6283 typedef IDataObject *LPDATAOBJECT;
6284
6285 typedef enum tagDATADIR {
6286     DATADIR_GET = 1,
6287     DATADIR_SET = 2
6288 } DATADIR;
6289
6290 /*****************************************************************************
6291  * IDataObject interface
6292  */
6293 DEFINE_GUID(IID_IDataObject, 0x0000010e, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
6294 #if defined(__cplusplus) && !defined(CINTERFACE)
6295 struct IDataObject : public IUnknown
6296 {
6297     virtual HRESULT STDMETHODCALLTYPE GetData(
6298         FORMATETC* pformatetcIn,
6299         STGMEDIUM* pmedium) = 0;
6300
6301     virtual HRESULT STDMETHODCALLTYPE GetDataHere(
6302         FORMATETC* pformatetc,
6303         STGMEDIUM* pmedium) = 0;
6304
6305     virtual HRESULT STDMETHODCALLTYPE QueryGetData(
6306         FORMATETC* pformatetc) = 0;
6307
6308     virtual HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc(
6309         FORMATETC* pformatectIn,
6310         FORMATETC* pformatetcOut) = 0;
6311
6312     virtual HRESULT STDMETHODCALLTYPE SetData(
6313         FORMATETC* pformatetc,
6314         STGMEDIUM* pmedium,
6315         BOOL fRelease) = 0;
6316
6317     virtual HRESULT STDMETHODCALLTYPE EnumFormatEtc(
6318         DWORD dwDirection,
6319         IEnumFORMATETC** ppenumFormatEtc) = 0;
6320
6321     virtual HRESULT STDMETHODCALLTYPE DAdvise(
6322         FORMATETC* pformatetc,
6323         DWORD advf,
6324         IAdviseSink* pAdvSink,
6325         DWORD* pdwConnection) = 0;
6326
6327     virtual HRESULT STDMETHODCALLTYPE DUnadvise(
6328         DWORD dwConnection) = 0;
6329
6330     virtual HRESULT STDMETHODCALLTYPE EnumDAdvise(
6331         IEnumSTATDATA** ppenumAdvise) = 0;
6332
6333 };
6334 #else
6335 typedef struct IDataObjectVtbl IDataObjectVtbl;
6336 struct IDataObject {
6337     const IDataObjectVtbl* lpVtbl;
6338 };
6339 struct IDataObjectVtbl {
6340     ICOM_MSVTABLE_COMPAT_FIELDS
6341
6342     /*** IUnknown methods ***/
6343     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
6344         IDataObject* This,
6345         REFIID riid,
6346         void** ppvObject);
6347
6348     ULONG (STDMETHODCALLTYPE *AddRef)(
6349         IDataObject* This);
6350
6351     ULONG (STDMETHODCALLTYPE *Release)(
6352         IDataObject* This);
6353
6354     /*** IDataObject methods ***/
6355     HRESULT (STDMETHODCALLTYPE *GetData)(
6356         IDataObject* This,
6357         FORMATETC* pformatetcIn,
6358         STGMEDIUM* pmedium);
6359
6360     HRESULT (STDMETHODCALLTYPE *GetDataHere)(
6361         IDataObject* This,
6362         FORMATETC* pformatetc,
6363         STGMEDIUM* pmedium);
6364
6365     HRESULT (STDMETHODCALLTYPE *QueryGetData)(
6366         IDataObject* This,
6367         FORMATETC* pformatetc);
6368
6369     HRESULT (STDMETHODCALLTYPE *GetCanonicalFormatEtc)(
6370         IDataObject* This,
6371         FORMATETC* pformatectIn,
6372         FORMATETC* pformatetcOut);
6373
6374     HRESULT (STDMETHODCALLTYPE *SetData)(
6375         IDataObject* This,
6376         FORMATETC* pformatetc,
6377         STGMEDIUM* pmedium,
6378         BOOL fRelease);
6379
6380     HRESULT (STDMETHODCALLTYPE *EnumFormatEtc)(
6381         IDataObject* This,
6382         DWORD dwDirection,
6383         IEnumFORMATETC** ppenumFormatEtc);
6384
6385     HRESULT (STDMETHODCALLTYPE *DAdvise)(
6386         IDataObject* This,
6387         FORMATETC* pformatetc,
6388         DWORD advf,
6389         IAdviseSink* pAdvSink,
6390         DWORD* pdwConnection);
6391
6392     HRESULT (STDMETHODCALLTYPE *DUnadvise)(
6393         IDataObject* This,
6394         DWORD dwConnection);
6395
6396     HRESULT (STDMETHODCALLTYPE *EnumDAdvise)(
6397         IDataObject* This,
6398         IEnumSTATDATA** ppenumAdvise);
6399
6400 };
6401
6402 /*** IUnknown methods ***/
6403 #define IDataObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
6404 #define IDataObject_AddRef(p) (p)->lpVtbl->AddRef(p)
6405 #define IDataObject_Release(p) (p)->lpVtbl->Release(p)
6406 /*** IDataObject methods ***/
6407 #define IDataObject_GetData(p,a,b) (p)->lpVtbl->GetData(p,a,b)
6408 #define IDataObject_GetDataHere(p,a,b) (p)->lpVtbl->GetDataHere(p,a,b)
6409 #define IDataObject_QueryGetData(p,a) (p)->lpVtbl->QueryGetData(p,a)
6410 #define IDataObject_GetCanonicalFormatEtc(p,a,b) (p)->lpVtbl->GetCanonicalFormatEtc(p,a,b)
6411 #define IDataObject_SetData(p,a,b,c) (p)->lpVtbl->SetData(p,a,b,c)
6412 #define IDataObject_EnumFormatEtc(p,a,b) (p)->lpVtbl->EnumFormatEtc(p,a,b)
6413 #define IDataObject_DAdvise(p,a,b,c,d) (p)->lpVtbl->DAdvise(p,a,b,c,d)
6414 #define IDataObject_DUnadvise(p,a) (p)->lpVtbl->DUnadvise(p,a)
6415 #define IDataObject_EnumDAdvise(p,a) (p)->lpVtbl->EnumDAdvise(p,a)
6416
6417 #endif
6418
6419 #define IDataObject_METHODS \
6420     ICOM_MSVTABLE_COMPAT_FIELDS \
6421     /*** IUnknown methods ***/ \
6422     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
6423     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
6424     STDMETHOD_(ULONG,Release)(THIS) PURE; \
6425     /*** IDataObject methods ***/ \
6426     STDMETHOD_(HRESULT,GetData)(THIS_ FORMATETC* pformatetcIn, STGMEDIUM* pmedium) PURE; \
6427     STDMETHOD_(HRESULT,GetDataHere)(THIS_ FORMATETC* pformatetc, STGMEDIUM* pmedium) PURE; \
6428     STDMETHOD_(HRESULT,QueryGetData)(THIS_ FORMATETC* pformatetc) PURE; \
6429     STDMETHOD_(HRESULT,GetCanonicalFormatEtc)(THIS_ FORMATETC* pformatectIn, FORMATETC* pformatetcOut) PURE; \
6430     STDMETHOD_(HRESULT,SetData)(THIS_ FORMATETC* pformatetc, STGMEDIUM* pmedium, BOOL fRelease) PURE; \
6431     STDMETHOD_(HRESULT,EnumFormatEtc)(THIS_ DWORD dwDirection, IEnumFORMATETC** ppenumFormatEtc) PURE; \
6432     STDMETHOD_(HRESULT,DAdvise)(THIS_ FORMATETC* pformatetc, DWORD advf, IAdviseSink* pAdvSink, DWORD* pdwConnection) PURE; \
6433     STDMETHOD_(HRESULT,DUnadvise)(THIS_ DWORD dwConnection) PURE; \
6434     STDMETHOD_(HRESULT,EnumDAdvise)(THIS_ IEnumSTATDATA** ppenumAdvise) PURE;
6435
6436 HRESULT CALLBACK IDataObject_RemoteGetData_Proxy(
6437     IDataObject* This,
6438     FORMATETC* pformatetcIn,
6439     STGMEDIUM* pRemoteMedium);
6440 void __RPC_STUB IDataObject_RemoteGetData_Stub(
6441     struct IRpcStubBuffer* This,
6442     struct IRpcChannelBuffer* pRpcChannelBuffer,
6443     PRPC_MESSAGE pRpcMessage,
6444     DWORD* pdwStubPhase);
6445 HRESULT CALLBACK IDataObject_GetData_Proxy(
6446     IDataObject* This,
6447     FORMATETC* pformatetcIn,
6448     STGMEDIUM* pmedium);
6449 HRESULT __RPC_STUB IDataObject_GetData_Stub(
6450     IDataObject* This,
6451     FORMATETC* pformatetcIn,
6452     STGMEDIUM* pRemoteMedium);
6453 HRESULT CALLBACK IDataObject_RemoteGetDataHere_Proxy(
6454     IDataObject* This,
6455     FORMATETC* pformatetc,
6456     STGMEDIUM* pRemoteMedium);
6457 void __RPC_STUB IDataObject_RemoteGetDataHere_Stub(
6458     struct IRpcStubBuffer* This,
6459     struct IRpcChannelBuffer* pRpcChannelBuffer,
6460     PRPC_MESSAGE pRpcMessage,
6461     DWORD* pdwStubPhase);
6462 HRESULT CALLBACK IDataObject_GetDataHere_Proxy(
6463     IDataObject* This,
6464     FORMATETC* pformatetc,
6465     STGMEDIUM* pmedium);
6466 HRESULT __RPC_STUB IDataObject_GetDataHere_Stub(
6467     IDataObject* This,
6468     FORMATETC* pformatetc,
6469     STGMEDIUM* pRemoteMedium);
6470 HRESULT CALLBACK IDataObject_QueryGetData_Proxy(
6471     IDataObject* This,
6472     FORMATETC* pformatetc);
6473 void __RPC_STUB IDataObject_QueryGetData_Stub(
6474     struct IRpcStubBuffer* This,
6475     struct IRpcChannelBuffer* pRpcChannelBuffer,
6476     PRPC_MESSAGE pRpcMessage,
6477     DWORD* pdwStubPhase);
6478 HRESULT CALLBACK IDataObject_GetCanonicalFormatEtc_Proxy(
6479     IDataObject* This,
6480     FORMATETC* pformatectIn,
6481     FORMATETC* pformatetcOut);
6482 void __RPC_STUB IDataObject_GetCanonicalFormatEtc_Stub(
6483     struct IRpcStubBuffer* This,
6484     struct IRpcChannelBuffer* pRpcChannelBuffer,
6485     PRPC_MESSAGE pRpcMessage,
6486     DWORD* pdwStubPhase);
6487 HRESULT CALLBACK IDataObject_RemoteSetData_Proxy(
6488     IDataObject* This,
6489     FORMATETC* pformatetc,
6490     FLAG_STGMEDIUM* pmedium,
6491     BOOL fRelease);
6492 void __RPC_STUB IDataObject_RemoteSetData_Stub(
6493     struct IRpcStubBuffer* This,
6494     struct IRpcChannelBuffer* pRpcChannelBuffer,
6495     PRPC_MESSAGE pRpcMessage,
6496     DWORD* pdwStubPhase);
6497 HRESULT CALLBACK IDataObject_SetData_Proxy(
6498     IDataObject* This,
6499     FORMATETC* pformatetc,
6500     STGMEDIUM* pmedium,
6501     BOOL fRelease);
6502 HRESULT __RPC_STUB IDataObject_SetData_Stub(
6503     IDataObject* This,
6504     FORMATETC* pformatetc,
6505     FLAG_STGMEDIUM* pmedium,
6506     BOOL fRelease);
6507 HRESULT CALLBACK IDataObject_EnumFormatEtc_Proxy(
6508     IDataObject* This,
6509     DWORD dwDirection,
6510     IEnumFORMATETC** ppenumFormatEtc);
6511 void __RPC_STUB IDataObject_EnumFormatEtc_Stub(
6512     struct IRpcStubBuffer* This,
6513     struct IRpcChannelBuffer* pRpcChannelBuffer,
6514     PRPC_MESSAGE pRpcMessage,
6515     DWORD* pdwStubPhase);
6516 HRESULT CALLBACK IDataObject_DAdvise_Proxy(
6517     IDataObject* This,
6518     FORMATETC* pformatetc,
6519     DWORD advf,
6520     IAdviseSink* pAdvSink,
6521     DWORD* pdwConnection);
6522 void __RPC_STUB IDataObject_DAdvise_Stub(
6523     struct IRpcStubBuffer* This,
6524     struct IRpcChannelBuffer* pRpcChannelBuffer,
6525     PRPC_MESSAGE pRpcMessage,
6526     DWORD* pdwStubPhase);
6527 HRESULT CALLBACK IDataObject_DUnadvise_Proxy(
6528     IDataObject* This,
6529     DWORD dwConnection);
6530 void __RPC_STUB IDataObject_DUnadvise_Stub(
6531     struct IRpcStubBuffer* This,
6532     struct IRpcChannelBuffer* pRpcChannelBuffer,
6533     PRPC_MESSAGE pRpcMessage,
6534     DWORD* pdwStubPhase);
6535 HRESULT CALLBACK IDataObject_EnumDAdvise_Proxy(
6536     IDataObject* This,
6537     IEnumSTATDATA** ppenumAdvise);
6538 void __RPC_STUB IDataObject_EnumDAdvise_Stub(
6539     struct IRpcStubBuffer* This,
6540     struct IRpcChannelBuffer* pRpcChannelBuffer,
6541     PRPC_MESSAGE pRpcMessage,
6542     DWORD* pdwStubPhase);
6543
6544 typedef struct IDataAdviseHolder IDataAdviseHolder;
6545 typedef IDataAdviseHolder *LPDATAADVISEHOLDER;
6546
6547 /*****************************************************************************
6548  * IDataAdviseHolder interface
6549  */
6550 DEFINE_GUID(IID_IDataAdviseHolder, 0x00000110, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
6551 #if defined(__cplusplus) && !defined(CINTERFACE)
6552 struct IDataAdviseHolder : public IUnknown
6553 {
6554     virtual HRESULT STDMETHODCALLTYPE Advise(
6555         IDataObject* pDataObject,
6556         FORMATETC* pFetc,
6557         DWORD advf,
6558         IAdviseSink* pAdvise,
6559         DWORD* pdwConnection) = 0;
6560
6561     virtual HRESULT STDMETHODCALLTYPE Unadvise(
6562         DWORD dwConnection) = 0;
6563
6564     virtual HRESULT STDMETHODCALLTYPE EnumAdvise(
6565         IEnumSTATDATA** ppenumAdvise) = 0;
6566
6567     virtual HRESULT STDMETHODCALLTYPE SendOnDataChange(
6568         IDataObject* pDataObject,
6569         DWORD dwReserved,
6570         DWORD advf) = 0;
6571
6572 };
6573 #else
6574 typedef struct IDataAdviseHolderVtbl IDataAdviseHolderVtbl;
6575 struct IDataAdviseHolder {
6576     const IDataAdviseHolderVtbl* lpVtbl;
6577 };
6578 struct IDataAdviseHolderVtbl {
6579     ICOM_MSVTABLE_COMPAT_FIELDS
6580
6581     /*** IUnknown methods ***/
6582     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
6583         IDataAdviseHolder* This,
6584         REFIID riid,
6585         void** ppvObject);
6586
6587     ULONG (STDMETHODCALLTYPE *AddRef)(
6588         IDataAdviseHolder* This);
6589
6590     ULONG (STDMETHODCALLTYPE *Release)(
6591         IDataAdviseHolder* This);
6592
6593     /*** IDataAdviseHolder methods ***/
6594     HRESULT (STDMETHODCALLTYPE *Advise)(
6595         IDataAdviseHolder* This,
6596         IDataObject* pDataObject,
6597         FORMATETC* pFetc,
6598         DWORD advf,
6599         IAdviseSink* pAdvise,
6600         DWORD* pdwConnection);
6601
6602     HRESULT (STDMETHODCALLTYPE *Unadvise)(
6603         IDataAdviseHolder* This,
6604         DWORD dwConnection);
6605
6606     HRESULT (STDMETHODCALLTYPE *EnumAdvise)(
6607         IDataAdviseHolder* This,
6608         IEnumSTATDATA** ppenumAdvise);
6609
6610     HRESULT (STDMETHODCALLTYPE *SendOnDataChange)(
6611         IDataAdviseHolder* This,
6612         IDataObject* pDataObject,
6613         DWORD dwReserved,
6614         DWORD advf);
6615
6616 };
6617
6618 /*** IUnknown methods ***/
6619 #define IDataAdviseHolder_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
6620 #define IDataAdviseHolder_AddRef(p) (p)->lpVtbl->AddRef(p)
6621 #define IDataAdviseHolder_Release(p) (p)->lpVtbl->Release(p)
6622 /*** IDataAdviseHolder methods ***/
6623 #define IDataAdviseHolder_Advise(p,a,b,c,d,e) (p)->lpVtbl->Advise(p,a,b,c,d,e)
6624 #define IDataAdviseHolder_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
6625 #define IDataAdviseHolder_EnumAdvise(p,a) (p)->lpVtbl->EnumAdvise(p,a)
6626 #define IDataAdviseHolder_SendOnDataChange(p,a,b,c) (p)->lpVtbl->SendOnDataChange(p,a,b,c)
6627
6628 #endif
6629
6630 #define IDataAdviseHolder_METHODS \
6631     ICOM_MSVTABLE_COMPAT_FIELDS \
6632     /*** IUnknown methods ***/ \
6633     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
6634     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
6635     STDMETHOD_(ULONG,Release)(THIS) PURE; \
6636     /*** IDataAdviseHolder methods ***/ \
6637     STDMETHOD_(HRESULT,Advise)(THIS_ IDataObject* pDataObject, FORMATETC* pFetc, DWORD advf, IAdviseSink* pAdvise, DWORD* pdwConnection) PURE; \
6638     STDMETHOD_(HRESULT,Unadvise)(THIS_ DWORD dwConnection) PURE; \
6639     STDMETHOD_(HRESULT,EnumAdvise)(THIS_ IEnumSTATDATA** ppenumAdvise) PURE; \
6640     STDMETHOD_(HRESULT,SendOnDataChange)(THIS_ IDataObject* pDataObject, DWORD dwReserved, DWORD advf) PURE;
6641
6642 HRESULT CALLBACK IDataAdviseHolder_Advise_Proxy(
6643     IDataAdviseHolder* This,
6644     IDataObject* pDataObject,
6645     FORMATETC* pFetc,
6646     DWORD advf,
6647     IAdviseSink* pAdvise,
6648     DWORD* pdwConnection);
6649 void __RPC_STUB IDataAdviseHolder_Advise_Stub(
6650     struct IRpcStubBuffer* This,
6651     struct IRpcChannelBuffer* pRpcChannelBuffer,
6652     PRPC_MESSAGE pRpcMessage,
6653     DWORD* pdwStubPhase);
6654 HRESULT CALLBACK IDataAdviseHolder_Unadvise_Proxy(
6655     IDataAdviseHolder* This,
6656     DWORD dwConnection);
6657 void __RPC_STUB IDataAdviseHolder_Unadvise_Stub(
6658     struct IRpcStubBuffer* This,
6659     struct IRpcChannelBuffer* pRpcChannelBuffer,
6660     PRPC_MESSAGE pRpcMessage,
6661     DWORD* pdwStubPhase);
6662 HRESULT CALLBACK IDataAdviseHolder_EnumAdvise_Proxy(
6663     IDataAdviseHolder* This,
6664     IEnumSTATDATA** ppenumAdvise);
6665 void __RPC_STUB IDataAdviseHolder_EnumAdvise_Stub(
6666     struct IRpcStubBuffer* This,
6667     struct IRpcChannelBuffer* pRpcChannelBuffer,
6668     PRPC_MESSAGE pRpcMessage,
6669     DWORD* pdwStubPhase);
6670 HRESULT CALLBACK IDataAdviseHolder_SendOnDataChange_Proxy(
6671     IDataAdviseHolder* This,
6672     IDataObject* pDataObject,
6673     DWORD dwReserved,
6674     DWORD advf);
6675 void __RPC_STUB IDataAdviseHolder_SendOnDataChange_Stub(
6676     struct IRpcStubBuffer* This,
6677     struct IRpcChannelBuffer* pRpcChannelBuffer,
6678     PRPC_MESSAGE pRpcMessage,
6679     DWORD* pdwStubPhase);
6680
6681 typedef struct IMessageFilter IMessageFilter;
6682 typedef IMessageFilter *LPMESSAGEFILTER;
6683
6684 typedef enum tagCALLTYPE {
6685     CALLTYPE_TOPLEVEL = 1,
6686     CALLTYPE_NESTED = 2,
6687     CALLTYPE_ASYNC = 3,
6688     CALLTYPE_TOPLEVEL_CALLPENDING = 4,
6689     CALLTYPE_ASYNC_CALLPENDING = 5
6690 } CALLTYPE;
6691
6692 typedef enum tagSERVERCALL {
6693     SERVERCALL_ISHANDLED = 0,
6694     SERVERCALL_REJECTED = 1,
6695     SERVERCALL_RETRYLATER = 2
6696 } SERVERCALL;
6697
6698 typedef enum tagPENDINGTYPE {
6699     PENDINGTYPE_TOPLEVEL = 1,
6700     PENDINGTYPE_NESTED = 2
6701 } PENDINGTYPE;
6702
6703 typedef enum tagPENDINGMSG {
6704     PENDINGMSG_CANCELCALL = 0,
6705     PENDINGMSG_WAITNOPROCESS = 1,
6706     PENDINGMSG_WAITDEFPROCESS = 2
6707 } PENDINGMSG;
6708
6709 typedef struct tagINTERFACEINFO {
6710     IUnknown *pUnk;
6711     IID iid;
6712     WORD wMethod;
6713 } INTERFACEINFO, *LPINTERFACEINFO;
6714
6715 /*****************************************************************************
6716  * IMessageFilter interface
6717  */
6718 DEFINE_GUID(IID_IMessageFilter, 0x00000016, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
6719 #if defined(__cplusplus) && !defined(CINTERFACE)
6720 struct IMessageFilter : public IUnknown
6721 {
6722     virtual DWORD STDMETHODCALLTYPE HandleInComingCall(
6723         DWORD dwCallType,
6724         HTASK htaskCaller,
6725         DWORD dwTickCount,
6726         LPINTERFACEINFO lpInterfaceInfo) = 0;
6727
6728     virtual DWORD STDMETHODCALLTYPE RetryRejectedCall(
6729         HTASK htaskCallee,
6730         DWORD dwTickCount,
6731         DWORD dwRejectType) = 0;
6732
6733     virtual DWORD STDMETHODCALLTYPE MessagePending(
6734         HTASK htaskCallee,
6735         DWORD dwTickCount,
6736         DWORD dwPendingType) = 0;
6737
6738 };
6739 #else
6740 typedef struct IMessageFilterVtbl IMessageFilterVtbl;
6741 struct IMessageFilter {
6742     const IMessageFilterVtbl* lpVtbl;
6743 };
6744 struct IMessageFilterVtbl {
6745     ICOM_MSVTABLE_COMPAT_FIELDS
6746
6747     /*** IUnknown methods ***/
6748     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
6749         IMessageFilter* This,
6750         REFIID riid,
6751         void** ppvObject);
6752
6753     ULONG (STDMETHODCALLTYPE *AddRef)(
6754         IMessageFilter* This);
6755
6756     ULONG (STDMETHODCALLTYPE *Release)(
6757         IMessageFilter* This);
6758
6759     /*** IMessageFilter methods ***/
6760     DWORD (STDMETHODCALLTYPE *HandleInComingCall)(
6761         IMessageFilter* This,
6762         DWORD dwCallType,
6763         HTASK htaskCaller,
6764         DWORD dwTickCount,
6765         LPINTERFACEINFO lpInterfaceInfo);
6766
6767     DWORD (STDMETHODCALLTYPE *RetryRejectedCall)(
6768         IMessageFilter* This,
6769         HTASK htaskCallee,
6770         DWORD dwTickCount,
6771         DWORD dwRejectType);
6772
6773     DWORD (STDMETHODCALLTYPE *MessagePending)(
6774         IMessageFilter* This,
6775         HTASK htaskCallee,
6776         DWORD dwTickCount,
6777         DWORD dwPendingType);
6778
6779 };
6780
6781 /*** IUnknown methods ***/
6782 #define IMessageFilter_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
6783 #define IMessageFilter_AddRef(p) (p)->lpVtbl->AddRef(p)
6784 #define IMessageFilter_Release(p) (p)->lpVtbl->Release(p)
6785 /*** IMessageFilter methods ***/
6786 #define IMessageFilter_HandleInComingCall(p,a,b,c,d) (p)->lpVtbl->HandleInComingCall(p,a,b,c,d)
6787 #define IMessageFilter_RetryRejectedCall(p,a,b,c) (p)->lpVtbl->RetryRejectedCall(p,a,b,c)
6788 #define IMessageFilter_MessagePending(p,a,b,c) (p)->lpVtbl->MessagePending(p,a,b,c)
6789
6790 #endif
6791
6792 #define IMessageFilter_METHODS \
6793     ICOM_MSVTABLE_COMPAT_FIELDS \
6794     /*** IUnknown methods ***/ \
6795     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
6796     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
6797     STDMETHOD_(ULONG,Release)(THIS) PURE; \
6798     /*** IMessageFilter methods ***/ \
6799     STDMETHOD_(DWORD,HandleInComingCall)(THIS_ DWORD dwCallType, HTASK htaskCaller, DWORD dwTickCount, LPINTERFACEINFO lpInterfaceInfo) PURE; \
6800     STDMETHOD_(DWORD,RetryRejectedCall)(THIS_ HTASK htaskCallee, DWORD dwTickCount, DWORD dwRejectType) PURE; \
6801     STDMETHOD_(DWORD,MessagePending)(THIS_ HTASK htaskCallee, DWORD dwTickCount, DWORD dwPendingType) PURE;
6802
6803 DWORD CALLBACK IMessageFilter_HandleInComingCall_Proxy(
6804     IMessageFilter* This,
6805     DWORD dwCallType,
6806     HTASK htaskCaller,
6807     DWORD dwTickCount,
6808     LPINTERFACEINFO lpInterfaceInfo);
6809 void __RPC_STUB IMessageFilter_HandleInComingCall_Stub(
6810     struct IRpcStubBuffer* This,
6811     struct IRpcChannelBuffer* pRpcChannelBuffer,
6812     PRPC_MESSAGE pRpcMessage,
6813     DWORD* pdwStubPhase);
6814 DWORD CALLBACK IMessageFilter_RetryRejectedCall_Proxy(
6815     IMessageFilter* This,
6816     HTASK htaskCallee,
6817     DWORD dwTickCount,
6818     DWORD dwRejectType);
6819 void __RPC_STUB IMessageFilter_RetryRejectedCall_Stub(
6820     struct IRpcStubBuffer* This,
6821     struct IRpcChannelBuffer* pRpcChannelBuffer,
6822     PRPC_MESSAGE pRpcMessage,
6823     DWORD* pdwStubPhase);
6824 DWORD CALLBACK IMessageFilter_MessagePending_Proxy(
6825     IMessageFilter* This,
6826     HTASK htaskCallee,
6827     DWORD dwTickCount,
6828     DWORD dwPendingType);
6829 void __RPC_STUB IMessageFilter_MessagePending_Stub(
6830     struct IRpcStubBuffer* This,
6831     struct IRpcChannelBuffer* pRpcChannelBuffer,
6832     PRPC_MESSAGE pRpcMessage,
6833     DWORD* pdwStubPhase);
6834
6835 typedef struct IRpcChannelBuffer IRpcChannelBuffer;
6836 typedef IRpcChannelBuffer *LPRPCCHANNELBUFFER;
6837
6838 typedef unsigned long RPCOLEDATAREP;
6839
6840 typedef struct tagRPCOLEMESSAGE {
6841     void *reserved1;
6842     RPCOLEDATAREP dataRepresentation;
6843     void *Buffer;
6844     ULONG cbBuffer;
6845     ULONG iMethod;
6846     void *reserved2[5];
6847     ULONG rpcFlags;
6848 } RPCOLEMESSAGE;
6849
6850 typedef RPCOLEMESSAGE *PRPCOLEMESSAGE;
6851
6852 /*****************************************************************************
6853  * IRpcChannelBuffer interface
6854  */
6855 DEFINE_GUID(IID_IRpcChannelBuffer, 0xd5f56b60, 0x593b, 0x101a, 0xb5,0x69, 0x08,0x00,0x2b,0x2d,0xbf,0x7a);
6856 #if defined(__cplusplus) && !defined(CINTERFACE)
6857 struct IRpcChannelBuffer : public IUnknown
6858 {
6859     virtual HRESULT STDMETHODCALLTYPE GetBuffer(
6860         RPCOLEMESSAGE* pMessage,
6861         REFIID riid) = 0;
6862
6863     virtual HRESULT STDMETHODCALLTYPE SendReceive(
6864         RPCOLEMESSAGE* pMessage,
6865         ULONG* pStatus) = 0;
6866
6867     virtual HRESULT STDMETHODCALLTYPE FreeBuffer(
6868         RPCOLEMESSAGE* pMessage) = 0;
6869
6870     virtual HRESULT STDMETHODCALLTYPE GetDestCtx(
6871         DWORD* pdwDestContext,
6872         void** ppvDestContext) = 0;
6873
6874     virtual HRESULT STDMETHODCALLTYPE IsConnected(
6875         ) = 0;
6876
6877 };
6878 #else
6879 typedef struct IRpcChannelBufferVtbl IRpcChannelBufferVtbl;
6880 struct IRpcChannelBuffer {
6881     const IRpcChannelBufferVtbl* lpVtbl;
6882 };
6883 struct IRpcChannelBufferVtbl {
6884     ICOM_MSVTABLE_COMPAT_FIELDS
6885
6886     /*** IUnknown methods ***/
6887     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
6888         IRpcChannelBuffer* This,
6889         REFIID riid,
6890         void** ppvObject);
6891
6892     ULONG (STDMETHODCALLTYPE *AddRef)(
6893         IRpcChannelBuffer* This);
6894
6895     ULONG (STDMETHODCALLTYPE *Release)(
6896         IRpcChannelBuffer* This);
6897
6898     /*** IRpcChannelBuffer methods ***/
6899     HRESULT (STDMETHODCALLTYPE *GetBuffer)(
6900         IRpcChannelBuffer* This,
6901         RPCOLEMESSAGE* pMessage,
6902         REFIID riid);
6903
6904     HRESULT (STDMETHODCALLTYPE *SendReceive)(
6905         IRpcChannelBuffer* This,
6906         RPCOLEMESSAGE* pMessage,
6907         ULONG* pStatus);
6908
6909     HRESULT (STDMETHODCALLTYPE *FreeBuffer)(
6910         IRpcChannelBuffer* This,
6911         RPCOLEMESSAGE* pMessage);
6912
6913     HRESULT (STDMETHODCALLTYPE *GetDestCtx)(
6914         IRpcChannelBuffer* This,
6915         DWORD* pdwDestContext,
6916         void** ppvDestContext);
6917
6918     HRESULT (STDMETHODCALLTYPE *IsConnected)(
6919         IRpcChannelBuffer* This);
6920
6921 };
6922
6923 /*** IUnknown methods ***/
6924 #define IRpcChannelBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
6925 #define IRpcChannelBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
6926 #define IRpcChannelBuffer_Release(p) (p)->lpVtbl->Release(p)
6927 /*** IRpcChannelBuffer methods ***/
6928 #define IRpcChannelBuffer_GetBuffer(p,a,b) (p)->lpVtbl->GetBuffer(p,a,b)
6929 #define IRpcChannelBuffer_SendReceive(p,a,b) (p)->lpVtbl->SendReceive(p,a,b)
6930 #define IRpcChannelBuffer_FreeBuffer(p,a) (p)->lpVtbl->FreeBuffer(p,a)
6931 #define IRpcChannelBuffer_GetDestCtx(p,a,b) (p)->lpVtbl->GetDestCtx(p,a,b)
6932 #define IRpcChannelBuffer_IsConnected(p) (p)->lpVtbl->IsConnected(p)
6933
6934 #endif
6935
6936 #define IRpcChannelBuffer_METHODS \
6937     ICOM_MSVTABLE_COMPAT_FIELDS \
6938     /*** IUnknown methods ***/ \
6939     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
6940     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
6941     STDMETHOD_(ULONG,Release)(THIS) PURE; \
6942     /*** IRpcChannelBuffer methods ***/ \
6943     STDMETHOD_(HRESULT,GetBuffer)(THIS_ RPCOLEMESSAGE* pMessage, REFIID riid) PURE; \
6944     STDMETHOD_(HRESULT,SendReceive)(THIS_ RPCOLEMESSAGE* pMessage, ULONG* pStatus) PURE; \
6945     STDMETHOD_(HRESULT,FreeBuffer)(THIS_ RPCOLEMESSAGE* pMessage) PURE; \
6946     STDMETHOD_(HRESULT,GetDestCtx)(THIS_ DWORD* pdwDestContext, void** ppvDestContext) PURE; \
6947     STDMETHOD_(HRESULT,IsConnected)(THIS) PURE;
6948
6949 HRESULT CALLBACK IRpcChannelBuffer_GetBuffer_Proxy(
6950     IRpcChannelBuffer* This,
6951     RPCOLEMESSAGE* pMessage,
6952     REFIID riid);
6953 void __RPC_STUB IRpcChannelBuffer_GetBuffer_Stub(
6954     struct IRpcStubBuffer* This,
6955     struct IRpcChannelBuffer* pRpcChannelBuffer,
6956     PRPC_MESSAGE pRpcMessage,
6957     DWORD* pdwStubPhase);
6958 HRESULT CALLBACK IRpcChannelBuffer_SendReceive_Proxy(
6959     IRpcChannelBuffer* This,
6960     RPCOLEMESSAGE* pMessage,
6961     ULONG* pStatus);
6962 void __RPC_STUB IRpcChannelBuffer_SendReceive_Stub(
6963     struct IRpcStubBuffer* This,
6964     struct IRpcChannelBuffer* pRpcChannelBuffer,
6965     PRPC_MESSAGE pRpcMessage,
6966     DWORD* pdwStubPhase);
6967 HRESULT CALLBACK IRpcChannelBuffer_FreeBuffer_Proxy(
6968     IRpcChannelBuffer* This,
6969     RPCOLEMESSAGE* pMessage);
6970 void __RPC_STUB IRpcChannelBuffer_FreeBuffer_Stub(
6971     struct IRpcStubBuffer* This,
6972     struct IRpcChannelBuffer* pRpcChannelBuffer,
6973     PRPC_MESSAGE pRpcMessage,
6974     DWORD* pdwStubPhase);
6975 HRESULT CALLBACK IRpcChannelBuffer_GetDestCtx_Proxy(
6976     IRpcChannelBuffer* This,
6977     DWORD* pdwDestContext,
6978     void** ppvDestContext);
6979 void __RPC_STUB IRpcChannelBuffer_GetDestCtx_Stub(
6980     struct IRpcStubBuffer* This,
6981     struct IRpcChannelBuffer* pRpcChannelBuffer,
6982     PRPC_MESSAGE pRpcMessage,
6983     DWORD* pdwStubPhase);
6984 HRESULT CALLBACK IRpcChannelBuffer_IsConnected_Proxy(
6985     IRpcChannelBuffer* This);
6986 void __RPC_STUB IRpcChannelBuffer_IsConnected_Stub(
6987     struct IRpcStubBuffer* This,
6988     struct IRpcChannelBuffer* pRpcChannelBuffer,
6989     PRPC_MESSAGE pRpcMessage,
6990     DWORD* pdwStubPhase);
6991
6992 typedef struct IRpcChannelBuffer2 IRpcChannelBuffer2;
6993 typedef IRpcChannelBuffer2 *LPRPCCHANNELBUFFER2;
6994
6995 /*****************************************************************************
6996  * IRpcChannelBuffer2 interface
6997  */
6998 DEFINE_GUID(IID_IRpcChannelBuffer2, 0x594f31d0, 0x7f19, 0x11d0, 0xb1,0x94, 0x00,0xa0,0xc9,0x0d,0xc8,0xbf);
6999 #if defined(__cplusplus) && !defined(CINTERFACE)
7000 struct IRpcChannelBuffer2 : public IRpcChannelBuffer
7001 {
7002     virtual HRESULT STDMETHODCALLTYPE GetProtocolVersion(
7003         DWORD* pdwVersion) = 0;
7004
7005 };
7006 #else
7007 typedef struct IRpcChannelBuffer2Vtbl IRpcChannelBuffer2Vtbl;
7008 struct IRpcChannelBuffer2 {
7009     const IRpcChannelBuffer2Vtbl* lpVtbl;
7010 };
7011 struct IRpcChannelBuffer2Vtbl {
7012     ICOM_MSVTABLE_COMPAT_FIELDS
7013
7014     /*** IUnknown methods ***/
7015     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
7016         IRpcChannelBuffer2* This,
7017         REFIID riid,
7018         void** ppvObject);
7019
7020     ULONG (STDMETHODCALLTYPE *AddRef)(
7021         IRpcChannelBuffer2* This);
7022
7023     ULONG (STDMETHODCALLTYPE *Release)(
7024         IRpcChannelBuffer2* This);
7025
7026     /*** IRpcChannelBuffer methods ***/
7027     HRESULT (STDMETHODCALLTYPE *GetBuffer)(
7028         IRpcChannelBuffer2* This,
7029         RPCOLEMESSAGE* pMessage,
7030         REFIID riid);
7031
7032     HRESULT (STDMETHODCALLTYPE *SendReceive)(
7033         IRpcChannelBuffer2* This,
7034         RPCOLEMESSAGE* pMessage,
7035         ULONG* pStatus);
7036
7037     HRESULT (STDMETHODCALLTYPE *FreeBuffer)(
7038         IRpcChannelBuffer2* This,
7039         RPCOLEMESSAGE* pMessage);
7040
7041     HRESULT (STDMETHODCALLTYPE *GetDestCtx)(
7042         IRpcChannelBuffer2* This,
7043         DWORD* pdwDestContext,
7044         void** ppvDestContext);
7045
7046     HRESULT (STDMETHODCALLTYPE *IsConnected)(
7047         IRpcChannelBuffer2* This);
7048
7049     /*** IRpcChannelBuffer2 methods ***/
7050     HRESULT (STDMETHODCALLTYPE *GetProtocolVersion)(
7051         IRpcChannelBuffer2* This,
7052         DWORD* pdwVersion);
7053
7054 };
7055
7056 /*** IUnknown methods ***/
7057 #define IRpcChannelBuffer2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
7058 #define IRpcChannelBuffer2_AddRef(p) (p)->lpVtbl->AddRef(p)
7059 #define IRpcChannelBuffer2_Release(p) (p)->lpVtbl->Release(p)
7060 /*** IRpcChannelBuffer methods ***/
7061 #define IRpcChannelBuffer2_GetBuffer(p,a,b) (p)->lpVtbl->GetBuffer(p,a,b)
7062 #define IRpcChannelBuffer2_SendReceive(p,a,b) (p)->lpVtbl->SendReceive(p,a,b)
7063 #define IRpcChannelBuffer2_FreeBuffer(p,a) (p)->lpVtbl->FreeBuffer(p,a)
7064 #define IRpcChannelBuffer2_GetDestCtx(p,a,b) (p)->lpVtbl->GetDestCtx(p,a,b)
7065 #define IRpcChannelBuffer2_IsConnected(p) (p)->lpVtbl->IsConnected(p)
7066 /*** IRpcChannelBuffer2 methods ***/
7067 #define IRpcChannelBuffer2_GetProtocolVersion(p,a) (p)->lpVtbl->GetProtocolVersion(p,a)
7068
7069 #endif
7070
7071 #define IRpcChannelBuffer2_METHODS \
7072     ICOM_MSVTABLE_COMPAT_FIELDS \
7073     /*** IUnknown methods ***/ \
7074     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
7075     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
7076     STDMETHOD_(ULONG,Release)(THIS) PURE; \
7077     /*** IRpcChannelBuffer methods ***/ \
7078     STDMETHOD_(HRESULT,GetBuffer)(THIS_ RPCOLEMESSAGE* pMessage, REFIID riid) PURE; \
7079     STDMETHOD_(HRESULT,SendReceive)(THIS_ RPCOLEMESSAGE* pMessage, ULONG* pStatus) PURE; \
7080     STDMETHOD_(HRESULT,FreeBuffer)(THIS_ RPCOLEMESSAGE* pMessage) PURE; \
7081     STDMETHOD_(HRESULT,GetDestCtx)(THIS_ DWORD* pdwDestContext, void** ppvDestContext) PURE; \
7082     STDMETHOD_(HRESULT,IsConnected)(THIS) PURE; \
7083     /*** IRpcChannelBuffer2 methods ***/ \
7084     STDMETHOD_(HRESULT,GetProtocolVersion)(THIS_ DWORD* pdwVersion) PURE;
7085
7086 HRESULT CALLBACK IRpcChannelBuffer2_GetProtocolVersion_Proxy(
7087     IRpcChannelBuffer2* This,
7088     DWORD* pdwVersion);
7089 void __RPC_STUB IRpcChannelBuffer2_GetProtocolVersion_Stub(
7090     struct IRpcStubBuffer* This,
7091     struct IRpcChannelBuffer* pRpcChannelBuffer,
7092     PRPC_MESSAGE pRpcMessage,
7093     DWORD* pdwStubPhase);
7094
7095 typedef struct IRpcChannelBuffer3 IRpcChannelBuffer3;
7096 typedef IRpcChannelBuffer3 *LPRPCCHANNELBUFFER3;
7097
7098 /*****************************************************************************
7099  * IRpcChannelBuffer3 interface
7100  */
7101 DEFINE_GUID(IID_IRpcChannelBuffer3, 0x25b15600, 0x0115, 0x11d0, 0xbf,0x0d, 0x00,0xaa,0x00,0xb8,0xdf,0xd2);
7102 #if defined(__cplusplus) && !defined(CINTERFACE)
7103 struct IRpcChannelBuffer3 : public IRpcChannelBuffer2
7104 {
7105     virtual HRESULT STDMETHODCALLTYPE Send(
7106         RPCOLEMESSAGE* pMsg,
7107         ULONG* pulStatus) = 0;
7108
7109     virtual HRESULT STDMETHODCALLTYPE Receive(
7110         RPCOLEMESSAGE* pMsg,
7111         ULONG ulSize,
7112         ULONG* pulStatus) = 0;
7113
7114     virtual HRESULT STDMETHODCALLTYPE Cancel(
7115         RPCOLEMESSAGE* pMsg) = 0;
7116
7117     virtual HRESULT STDMETHODCALLTYPE GetCallContext(
7118         RPCOLEMESSAGE* pMsg,
7119         REFIID riid,
7120         void** pInterface) = 0;
7121
7122     virtual HRESULT STDMETHODCALLTYPE GetDestCtxEx(
7123         RPCOLEMESSAGE* pMsg,
7124         DWORD* pdwDestContext,
7125         void** ppvDestContext) = 0;
7126
7127     virtual HRESULT STDMETHODCALLTYPE GetState(
7128         RPCOLEMESSAGE* pMsg,
7129         DWORD* pState) = 0;
7130
7131     virtual HRESULT STDMETHODCALLTYPE RegisterAsync(
7132         RPCOLEMESSAGE* pMsg,
7133         IAsyncManager* pAsyncMgr) = 0;
7134
7135 };
7136 #else
7137 typedef struct IRpcChannelBuffer3Vtbl IRpcChannelBuffer3Vtbl;
7138 struct IRpcChannelBuffer3 {
7139     const IRpcChannelBuffer3Vtbl* lpVtbl;
7140 };
7141 struct IRpcChannelBuffer3Vtbl {
7142     ICOM_MSVTABLE_COMPAT_FIELDS
7143
7144     /*** IUnknown methods ***/
7145     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
7146         IRpcChannelBuffer3* This,
7147         REFIID riid,
7148         void** ppvObject);
7149
7150     ULONG (STDMETHODCALLTYPE *AddRef)(
7151         IRpcChannelBuffer3* This);
7152
7153     ULONG (STDMETHODCALLTYPE *Release)(
7154         IRpcChannelBuffer3* This);
7155
7156     /*** IRpcChannelBuffer methods ***/
7157     HRESULT (STDMETHODCALLTYPE *GetBuffer)(
7158         IRpcChannelBuffer3* This,
7159         RPCOLEMESSAGE* pMessage,
7160         REFIID riid);
7161
7162     HRESULT (STDMETHODCALLTYPE *SendReceive)(
7163         IRpcChannelBuffer3* This,
7164         RPCOLEMESSAGE* pMessage,
7165         ULONG* pStatus);
7166
7167     HRESULT (STDMETHODCALLTYPE *FreeBuffer)(
7168         IRpcChannelBuffer3* This,
7169         RPCOLEMESSAGE* pMessage);
7170
7171     HRESULT (STDMETHODCALLTYPE *GetDestCtx)(
7172         IRpcChannelBuffer3* This,
7173         DWORD* pdwDestContext,
7174         void** ppvDestContext);
7175
7176     HRESULT (STDMETHODCALLTYPE *IsConnected)(
7177         IRpcChannelBuffer3* This);
7178
7179     /*** IRpcChannelBuffer2 methods ***/
7180     HRESULT (STDMETHODCALLTYPE *GetProtocolVersion)(
7181         IRpcChannelBuffer3* This,
7182         DWORD* pdwVersion);
7183
7184     /*** IRpcChannelBuffer3 methods ***/
7185     HRESULT (STDMETHODCALLTYPE *Send)(
7186         IRpcChannelBuffer3* This,
7187         RPCOLEMESSAGE* pMsg,
7188         ULONG* pulStatus);
7189
7190     HRESULT (STDMETHODCALLTYPE *Receive)(
7191         IRpcChannelBuffer3* This,
7192         RPCOLEMESSAGE* pMsg,
7193         ULONG ulSize,
7194         ULONG* pulStatus);
7195
7196     HRESULT (STDMETHODCALLTYPE *Cancel)(
7197         IRpcChannelBuffer3* This,
7198         RPCOLEMESSAGE* pMsg);
7199
7200     HRESULT (STDMETHODCALLTYPE *GetCallContext)(
7201         IRpcChannelBuffer3* This,
7202         RPCOLEMESSAGE* pMsg,
7203         REFIID riid,
7204         void** pInterface);
7205
7206     HRESULT (STDMETHODCALLTYPE *GetDestCtxEx)(
7207         IRpcChannelBuffer3* This,
7208         RPCOLEMESSAGE* pMsg,
7209         DWORD* pdwDestContext,
7210         void** ppvDestContext);
7211
7212     HRESULT (STDMETHODCALLTYPE *GetState)(
7213         IRpcChannelBuffer3* This,
7214         RPCOLEMESSAGE* pMsg,
7215         DWORD* pState);
7216
7217     HRESULT (STDMETHODCALLTYPE *RegisterAsync)(
7218         IRpcChannelBuffer3* This,
7219         RPCOLEMESSAGE* pMsg,
7220         IAsyncManager* pAsyncMgr);
7221
7222 };
7223
7224 /*** IUnknown methods ***/
7225 #define IRpcChannelBuffer3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
7226 #define IRpcChannelBuffer3_AddRef(p) (p)->lpVtbl->AddRef(p)
7227 #define IRpcChannelBuffer3_Release(p) (p)->lpVtbl->Release(p)
7228 /*** IRpcChannelBuffer methods ***/
7229 #define IRpcChannelBuffer3_GetBuffer(p,a,b) (p)->lpVtbl->GetBuffer(p,a,b)
7230 #define IRpcChannelBuffer3_SendReceive(p,a,b) (p)->lpVtbl->SendReceive(p,a,b)
7231 #define IRpcChannelBuffer3_FreeBuffer(p,a) (p)->lpVtbl->FreeBuffer(p,a)
7232 #define IRpcChannelBuffer3_GetDestCtx(p,a,b) (p)->lpVtbl->GetDestCtx(p,a,b)
7233 #define IRpcChannelBuffer3_IsConnected(p) (p)->lpVtbl->IsConnected(p)
7234 /*** IRpcChannelBuffer2 methods ***/
7235 #define IRpcChannelBuffer3_GetProtocolVersion(p,a) (p)->lpVtbl->GetProtocolVersion(p,a)
7236 /*** IRpcChannelBuffer3 methods ***/
7237 #define IRpcChannelBuffer3_Send(p,a,b) (p)->lpVtbl->Send(p,a,b)
7238 #define IRpcChannelBuffer3_Receive(p,a,b,c) (p)->lpVtbl->Receive(p,a,b,c)
7239 #define IRpcChannelBuffer3_Cancel(p,a) (p)->lpVtbl->Cancel(p,a)
7240 #define IRpcChannelBuffer3_GetCallContext(p,a,b,c) (p)->lpVtbl->GetCallContext(p,a,b,c)
7241 #define IRpcChannelBuffer3_GetDestCtxEx(p,a,b,c) (p)->lpVtbl->GetDestCtxEx(p,a,b,c)
7242 #define IRpcChannelBuffer3_GetState(p,a,b) (p)->lpVtbl->GetState(p,a,b)
7243 #define IRpcChannelBuffer3_RegisterAsync(p,a,b) (p)->lpVtbl->RegisterAsync(p,a,b)
7244
7245 #endif
7246
7247 #define IRpcChannelBuffer3_METHODS \
7248     ICOM_MSVTABLE_COMPAT_FIELDS \
7249     /*** IUnknown methods ***/ \
7250     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
7251     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
7252     STDMETHOD_(ULONG,Release)(THIS) PURE; \
7253     /*** IRpcChannelBuffer methods ***/ \
7254     STDMETHOD_(HRESULT,GetBuffer)(THIS_ RPCOLEMESSAGE* pMessage, REFIID riid) PURE; \
7255     STDMETHOD_(HRESULT,SendReceive)(THIS_ RPCOLEMESSAGE* pMessage, ULONG* pStatus) PURE; \
7256     STDMETHOD_(HRESULT,FreeBuffer)(THIS_ RPCOLEMESSAGE* pMessage) PURE; \
7257     STDMETHOD_(HRESULT,GetDestCtx)(THIS_ DWORD* pdwDestContext, void** ppvDestContext) PURE; \
7258     STDMETHOD_(HRESULT,IsConnected)(THIS) PURE; \
7259     /*** IRpcChannelBuffer2 methods ***/ \
7260     STDMETHOD_(HRESULT,GetProtocolVersion)(THIS_ DWORD* pdwVersion) PURE; \
7261     /*** IRpcChannelBuffer3 methods ***/ \
7262     STDMETHOD_(HRESULT,Send)(THIS_ RPCOLEMESSAGE* pMsg, ULONG* pulStatus) PURE; \
7263     STDMETHOD_(HRESULT,Receive)(THIS_ RPCOLEMESSAGE* pMsg, ULONG ulSize, ULONG* pulStatus) PURE; \
7264     STDMETHOD_(HRESULT,Cancel)(THIS_ RPCOLEMESSAGE* pMsg) PURE; \
7265     STDMETHOD_(HRESULT,GetCallContext)(THIS_ RPCOLEMESSAGE* pMsg, REFIID riid, void** pInterface) PURE; \
7266     STDMETHOD_(HRESULT,GetDestCtxEx)(THIS_ RPCOLEMESSAGE* pMsg, DWORD* pdwDestContext, void** ppvDestContext) PURE; \
7267     STDMETHOD_(HRESULT,GetState)(THIS_ RPCOLEMESSAGE* pMsg, DWORD* pState) PURE; \
7268     STDMETHOD_(HRESULT,RegisterAsync)(THIS_ RPCOLEMESSAGE* pMsg, IAsyncManager* pAsyncMgr) PURE;
7269
7270 HRESULT CALLBACK IRpcChannelBuffer3_Send_Proxy(
7271     IRpcChannelBuffer3* This,
7272     RPCOLEMESSAGE* pMsg,
7273     ULONG* pulStatus);
7274 void __RPC_STUB IRpcChannelBuffer3_Send_Stub(
7275     struct IRpcStubBuffer* This,
7276     struct IRpcChannelBuffer* pRpcChannelBuffer,
7277     PRPC_MESSAGE pRpcMessage,
7278     DWORD* pdwStubPhase);
7279 HRESULT CALLBACK IRpcChannelBuffer3_Receive_Proxy(
7280     IRpcChannelBuffer3* This,
7281     RPCOLEMESSAGE* pMsg,
7282     ULONG ulSize,
7283     ULONG* pulStatus);
7284 void __RPC_STUB IRpcChannelBuffer3_Receive_Stub(
7285     struct IRpcStubBuffer* This,
7286     struct IRpcChannelBuffer* pRpcChannelBuffer,
7287     PRPC_MESSAGE pRpcMessage,
7288     DWORD* pdwStubPhase);
7289 HRESULT CALLBACK IRpcChannelBuffer3_Cancel_Proxy(
7290     IRpcChannelBuffer3* This,
7291     RPCOLEMESSAGE* pMsg);
7292 void __RPC_STUB IRpcChannelBuffer3_Cancel_Stub(
7293     struct IRpcStubBuffer* This,
7294     struct IRpcChannelBuffer* pRpcChannelBuffer,
7295     PRPC_MESSAGE pRpcMessage,
7296     DWORD* pdwStubPhase);
7297 HRESULT CALLBACK IRpcChannelBuffer3_GetCallContext_Proxy(
7298     IRpcChannelBuffer3* This,
7299     RPCOLEMESSAGE* pMsg,
7300     REFIID riid,
7301     void** pInterface);
7302 void __RPC_STUB IRpcChannelBuffer3_GetCallContext_Stub(
7303     struct IRpcStubBuffer* This,
7304     struct IRpcChannelBuffer* pRpcChannelBuffer,
7305     PRPC_MESSAGE pRpcMessage,
7306     DWORD* pdwStubPhase);
7307 HRESULT CALLBACK IRpcChannelBuffer3_GetDestCtxEx_Proxy(
7308     IRpcChannelBuffer3* This,
7309     RPCOLEMESSAGE* pMsg,
7310     DWORD* pdwDestContext,
7311     void** ppvDestContext);
7312 void __RPC_STUB IRpcChannelBuffer3_GetDestCtxEx_Stub(
7313     struct IRpcStubBuffer* This,
7314     struct IRpcChannelBuffer* pRpcChannelBuffer,
7315     PRPC_MESSAGE pRpcMessage,
7316     DWORD* pdwStubPhase);
7317 HRESULT CALLBACK IRpcChannelBuffer3_GetState_Proxy(
7318     IRpcChannelBuffer3* This,
7319     RPCOLEMESSAGE* pMsg,
7320     DWORD* pState);
7321 void __RPC_STUB IRpcChannelBuffer3_GetState_Stub(
7322     struct IRpcStubBuffer* This,
7323     struct IRpcChannelBuffer* pRpcChannelBuffer,
7324     PRPC_MESSAGE pRpcMessage,
7325     DWORD* pdwStubPhase);
7326 HRESULT CALLBACK IRpcChannelBuffer3_RegisterAsync_Proxy(
7327     IRpcChannelBuffer3* This,
7328     RPCOLEMESSAGE* pMsg,
7329     IAsyncManager* pAsyncMgr);
7330 void __RPC_STUB IRpcChannelBuffer3_RegisterAsync_Stub(
7331     struct IRpcStubBuffer* This,
7332     struct IRpcChannelBuffer* pRpcChannelBuffer,
7333     PRPC_MESSAGE pRpcMessage,
7334     DWORD* pdwStubPhase);
7335
7336 typedef struct IRpcProxyBuffer IRpcProxyBuffer;
7337 typedef IRpcProxyBuffer *LPRPCPROXYBUFFER;
7338
7339 /*****************************************************************************
7340  * IRpcProxyBuffer interface
7341  */
7342 DEFINE_GUID(IID_IRpcProxyBuffer, 0xd5f56a34, 0x593b, 0x101a, 0xb5,0x69, 0x08,0x00,0x2b,0x2d,0xbf,0x7a);
7343 #if defined(__cplusplus) && !defined(CINTERFACE)
7344 struct IRpcProxyBuffer : public IUnknown
7345 {
7346     virtual HRESULT STDMETHODCALLTYPE Connect(
7347         IRpcChannelBuffer* pRpcChannelBuffer) = 0;
7348
7349     virtual void STDMETHODCALLTYPE Disconnect(
7350         ) = 0;
7351
7352 };
7353 #else
7354 typedef struct IRpcProxyBufferVtbl IRpcProxyBufferVtbl;
7355 struct IRpcProxyBuffer {
7356     const IRpcProxyBufferVtbl* lpVtbl;
7357 };
7358 struct IRpcProxyBufferVtbl {
7359     ICOM_MSVTABLE_COMPAT_FIELDS
7360
7361     /*** IUnknown methods ***/
7362     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
7363         IRpcProxyBuffer* This,
7364         REFIID riid,
7365         void** ppvObject);
7366
7367     ULONG (STDMETHODCALLTYPE *AddRef)(
7368         IRpcProxyBuffer* This);
7369
7370     ULONG (STDMETHODCALLTYPE *Release)(
7371         IRpcProxyBuffer* This);
7372
7373     /*** IRpcProxyBuffer methods ***/
7374     HRESULT (STDMETHODCALLTYPE *Connect)(
7375         IRpcProxyBuffer* This,
7376         IRpcChannelBuffer* pRpcChannelBuffer);
7377
7378     void (STDMETHODCALLTYPE *Disconnect)(
7379         IRpcProxyBuffer* This);
7380
7381 };
7382
7383 /*** IUnknown methods ***/
7384 #define IRpcProxyBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
7385 #define IRpcProxyBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
7386 #define IRpcProxyBuffer_Release(p) (p)->lpVtbl->Release(p)
7387 /*** IRpcProxyBuffer methods ***/
7388 #define IRpcProxyBuffer_Connect(p,a) (p)->lpVtbl->Connect(p,a)
7389 #define IRpcProxyBuffer_Disconnect(p) (p)->lpVtbl->Disconnect(p)
7390
7391 #endif
7392
7393 #define IRpcProxyBuffer_METHODS \
7394     ICOM_MSVTABLE_COMPAT_FIELDS \
7395     /*** IUnknown methods ***/ \
7396     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
7397     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
7398     STDMETHOD_(ULONG,Release)(THIS) PURE; \
7399     /*** IRpcProxyBuffer methods ***/ \
7400     STDMETHOD_(HRESULT,Connect)(THIS_ IRpcChannelBuffer* pRpcChannelBuffer) PURE; \
7401     STDMETHOD_(void,Disconnect)(THIS) PURE;
7402
7403 HRESULT CALLBACK IRpcProxyBuffer_Connect_Proxy(
7404     IRpcProxyBuffer* This,
7405     IRpcChannelBuffer* pRpcChannelBuffer);
7406 void __RPC_STUB IRpcProxyBuffer_Connect_Stub(
7407     struct IRpcStubBuffer* This,
7408     struct IRpcChannelBuffer* pRpcChannelBuffer,
7409     PRPC_MESSAGE pRpcMessage,
7410     DWORD* pdwStubPhase);
7411 void CALLBACK IRpcProxyBuffer_Disconnect_Proxy(
7412     IRpcProxyBuffer* This);
7413 void __RPC_STUB IRpcProxyBuffer_Disconnect_Stub(
7414     struct IRpcStubBuffer* This,
7415     struct IRpcChannelBuffer* pRpcChannelBuffer,
7416     PRPC_MESSAGE pRpcMessage,
7417     DWORD* pdwStubPhase);
7418
7419 typedef struct IRpcStubBuffer IRpcStubBuffer;
7420 typedef IRpcStubBuffer *LPRPCSTUBBUFFER;
7421
7422 /*****************************************************************************
7423  * IRpcStubBuffer interface
7424  */
7425 DEFINE_GUID(IID_IRpcStubBuffer, 0xd5f56afc, 0x593b, 0x101a, 0xb5,0x69, 0x08,0x00,0x2b,0x2d,0xbf,0x7a);
7426 #if defined(__cplusplus) && !defined(CINTERFACE)
7427 struct IRpcStubBuffer : public IUnknown
7428 {
7429     virtual HRESULT STDMETHODCALLTYPE Connect(
7430         IUnknown* pUnkServer) = 0;
7431
7432     virtual void STDMETHODCALLTYPE Disconnect(
7433         ) = 0;
7434
7435     virtual HRESULT STDMETHODCALLTYPE Invoke(
7436         RPCOLEMESSAGE* _prpcmsg,
7437         IRpcChannelBuffer* _pRpcChannelBuffer) = 0;
7438
7439     virtual IRpcStubBuffer* STDMETHODCALLTYPE IsIIDSupported(
7440         REFIID riid) = 0;
7441
7442     virtual ULONG STDMETHODCALLTYPE CountRefs(
7443         ) = 0;
7444
7445     virtual HRESULT STDMETHODCALLTYPE DebugServerQueryInterface(
7446         void** ppv) = 0;
7447
7448     virtual void STDMETHODCALLTYPE DebugServerRelease(
7449         void* pv) = 0;
7450
7451 };
7452 #else
7453 typedef struct IRpcStubBufferVtbl IRpcStubBufferVtbl;
7454 struct IRpcStubBuffer {
7455     const IRpcStubBufferVtbl* lpVtbl;
7456 };
7457 struct IRpcStubBufferVtbl {
7458     ICOM_MSVTABLE_COMPAT_FIELDS
7459
7460     /*** IUnknown methods ***/
7461     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
7462         IRpcStubBuffer* This,
7463         REFIID riid,
7464         void** ppvObject);
7465
7466     ULONG (STDMETHODCALLTYPE *AddRef)(
7467         IRpcStubBuffer* This);
7468
7469     ULONG (STDMETHODCALLTYPE *Release)(
7470         IRpcStubBuffer* This);
7471
7472     /*** IRpcStubBuffer methods ***/
7473     HRESULT (STDMETHODCALLTYPE *Connect)(
7474         IRpcStubBuffer* This,
7475         IUnknown* pUnkServer);
7476
7477     void (STDMETHODCALLTYPE *Disconnect)(
7478         IRpcStubBuffer* This);
7479
7480     HRESULT (STDMETHODCALLTYPE *Invoke)(
7481         IRpcStubBuffer* This,
7482         RPCOLEMESSAGE* _prpcmsg,
7483         IRpcChannelBuffer* _pRpcChannelBuffer);
7484
7485     IRpcStubBuffer* (STDMETHODCALLTYPE *IsIIDSupported)(
7486         IRpcStubBuffer* This,
7487         REFIID riid);
7488
7489     ULONG (STDMETHODCALLTYPE *CountRefs)(
7490         IRpcStubBuffer* This);
7491
7492     HRESULT (STDMETHODCALLTYPE *DebugServerQueryInterface)(
7493         IRpcStubBuffer* This,
7494         void** ppv);
7495
7496     void (STDMETHODCALLTYPE *DebugServerRelease)(
7497         IRpcStubBuffer* This,
7498         void* pv);
7499
7500 };
7501
7502 /*** IUnknown methods ***/
7503 #define IRpcStubBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
7504 #define IRpcStubBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
7505 #define IRpcStubBuffer_Release(p) (p)->lpVtbl->Release(p)
7506 /*** IRpcStubBuffer methods ***/
7507 #define IRpcStubBuffer_Connect(p,a) (p)->lpVtbl->Connect(p,a)
7508 #define IRpcStubBuffer_Disconnect(p) (p)->lpVtbl->Disconnect(p)
7509 #define IRpcStubBuffer_Invoke(p,a,b) (p)->lpVtbl->Invoke(p,a,b)
7510 #define IRpcStubBuffer_IsIIDSupported(p,a) (p)->lpVtbl->IsIIDSupported(p,a)
7511 #define IRpcStubBuffer_CountRefs(p) (p)->lpVtbl->CountRefs(p)
7512 #define IRpcStubBuffer_DebugServerQueryInterface(p,a) (p)->lpVtbl->DebugServerQueryInterface(p,a)
7513 #define IRpcStubBuffer_DebugServerRelease(p,a) (p)->lpVtbl->DebugServerRelease(p,a)
7514
7515 #endif
7516
7517 #define IRpcStubBuffer_METHODS \
7518     ICOM_MSVTABLE_COMPAT_FIELDS \
7519     /*** IUnknown methods ***/ \
7520     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
7521     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
7522     STDMETHOD_(ULONG,Release)(THIS) PURE; \
7523     /*** IRpcStubBuffer methods ***/ \
7524     STDMETHOD_(HRESULT,Connect)(THIS_ IUnknown* pUnkServer) PURE; \
7525     STDMETHOD_(void,Disconnect)(THIS) PURE; \
7526     STDMETHOD_(HRESULT,Invoke)(THIS_ RPCOLEMESSAGE* _prpcmsg, IRpcChannelBuffer* _pRpcChannelBuffer) PURE; \
7527     STDMETHOD_(IRpcStubBuffer*,IsIIDSupported)(THIS_ REFIID riid) PURE; \
7528     STDMETHOD_(ULONG,CountRefs)(THIS) PURE; \
7529     STDMETHOD_(HRESULT,DebugServerQueryInterface)(THIS_ void** ppv) PURE; \
7530     STDMETHOD_(void,DebugServerRelease)(THIS_ void* pv) PURE;
7531
7532 HRESULT CALLBACK IRpcStubBuffer_Connect_Proxy(
7533     IRpcStubBuffer* This,
7534     IUnknown* pUnkServer);
7535 void __RPC_STUB IRpcStubBuffer_Connect_Stub(
7536     struct IRpcStubBuffer* This,
7537     struct IRpcChannelBuffer* pRpcChannelBuffer,
7538     PRPC_MESSAGE pRpcMessage,
7539     DWORD* pdwStubPhase);
7540 void CALLBACK IRpcStubBuffer_Disconnect_Proxy(
7541     IRpcStubBuffer* This);
7542 void __RPC_STUB IRpcStubBuffer_Disconnect_Stub(
7543     struct IRpcStubBuffer* This,
7544     struct IRpcChannelBuffer* pRpcChannelBuffer,
7545     PRPC_MESSAGE pRpcMessage,
7546     DWORD* pdwStubPhase);
7547 HRESULT CALLBACK IRpcStubBuffer_Invoke_Proxy(
7548     IRpcStubBuffer* This,
7549     RPCOLEMESSAGE* _prpcmsg,
7550     IRpcChannelBuffer* _pRpcChannelBuffer);
7551 void __RPC_STUB IRpcStubBuffer_Invoke_Stub(
7552     struct IRpcStubBuffer* This,
7553     struct IRpcChannelBuffer* pRpcChannelBuffer,
7554     PRPC_MESSAGE pRpcMessage,
7555     DWORD* pdwStubPhase);
7556 IRpcStubBuffer* CALLBACK IRpcStubBuffer_IsIIDSupported_Proxy(
7557     IRpcStubBuffer* This,
7558     REFIID riid);
7559 void __RPC_STUB IRpcStubBuffer_IsIIDSupported_Stub(
7560     struct IRpcStubBuffer* This,
7561     struct IRpcChannelBuffer* pRpcChannelBuffer,
7562     PRPC_MESSAGE pRpcMessage,
7563     DWORD* pdwStubPhase);
7564 ULONG CALLBACK IRpcStubBuffer_CountRefs_Proxy(
7565     IRpcStubBuffer* This);
7566 void __RPC_STUB IRpcStubBuffer_CountRefs_Stub(
7567     struct IRpcStubBuffer* This,
7568     struct IRpcChannelBuffer* pRpcChannelBuffer,
7569     PRPC_MESSAGE pRpcMessage,
7570     DWORD* pdwStubPhase);
7571 HRESULT CALLBACK IRpcStubBuffer_DebugServerQueryInterface_Proxy(
7572     IRpcStubBuffer* This,
7573     void** ppv);
7574 void __RPC_STUB IRpcStubBuffer_DebugServerQueryInterface_Stub(
7575     struct IRpcStubBuffer* This,
7576     struct IRpcChannelBuffer* pRpcChannelBuffer,
7577     PRPC_MESSAGE pRpcMessage,
7578     DWORD* pdwStubPhase);
7579 void CALLBACK IRpcStubBuffer_DebugServerRelease_Proxy(
7580     IRpcStubBuffer* This,
7581     void* pv);
7582 void __RPC_STUB IRpcStubBuffer_DebugServerRelease_Stub(
7583     struct IRpcStubBuffer* This,
7584     struct IRpcChannelBuffer* pRpcChannelBuffer,
7585     PRPC_MESSAGE pRpcMessage,
7586     DWORD* pdwStubPhase);
7587
7588 typedef struct IPSFactoryBuffer IPSFactoryBuffer;
7589 typedef IPSFactoryBuffer *LPPSFACTORYBUFFER;
7590
7591 /*****************************************************************************
7592  * IPSFactoryBuffer interface
7593  */
7594 DEFINE_GUID(IID_IPSFactoryBuffer, 0xd5f569d0, 0x593b, 0x101a, 0xb5,0x69, 0x08,0x00,0x2b,0x2d,0xbf,0x7a);
7595 #if defined(__cplusplus) && !defined(CINTERFACE)
7596 struct IPSFactoryBuffer : public IUnknown
7597 {
7598     virtual HRESULT STDMETHODCALLTYPE CreateProxy(
7599         IUnknown* pUnkOuter,
7600         REFIID riid,
7601         IRpcProxyBuffer** ppProxy,
7602         void** ppv) = 0;
7603
7604     virtual HRESULT STDMETHODCALLTYPE CreateStub(
7605         REFIID riid,
7606         IUnknown* pUnkServer,
7607         IRpcStubBuffer** ppStub) = 0;
7608
7609 };
7610 #else
7611 typedef struct IPSFactoryBufferVtbl IPSFactoryBufferVtbl;
7612 struct IPSFactoryBuffer {
7613     const IPSFactoryBufferVtbl* lpVtbl;
7614 };
7615 struct IPSFactoryBufferVtbl {
7616     ICOM_MSVTABLE_COMPAT_FIELDS
7617
7618     /*** IUnknown methods ***/
7619     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
7620         IPSFactoryBuffer* This,
7621         REFIID riid,
7622         void** ppvObject);
7623
7624     ULONG (STDMETHODCALLTYPE *AddRef)(
7625         IPSFactoryBuffer* This);
7626
7627     ULONG (STDMETHODCALLTYPE *Release)(
7628         IPSFactoryBuffer* This);
7629
7630     /*** IPSFactoryBuffer methods ***/
7631     HRESULT (STDMETHODCALLTYPE *CreateProxy)(
7632         IPSFactoryBuffer* This,
7633         IUnknown* pUnkOuter,
7634         REFIID riid,
7635         IRpcProxyBuffer** ppProxy,
7636         void** ppv);
7637
7638     HRESULT (STDMETHODCALLTYPE *CreateStub)(
7639         IPSFactoryBuffer* This,
7640         REFIID riid,
7641         IUnknown* pUnkServer,
7642         IRpcStubBuffer** ppStub);
7643
7644 };
7645
7646 /*** IUnknown methods ***/
7647 #define IPSFactoryBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
7648 #define IPSFactoryBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
7649 #define IPSFactoryBuffer_Release(p) (p)->lpVtbl->Release(p)
7650 /*** IPSFactoryBuffer methods ***/
7651 #define IPSFactoryBuffer_CreateProxy(p,a,b,c,d) (p)->lpVtbl->CreateProxy(p,a,b,c,d)
7652 #define IPSFactoryBuffer_CreateStub(p,a,b,c) (p)->lpVtbl->CreateStub(p,a,b,c)
7653
7654 #endif
7655
7656 #define IPSFactoryBuffer_METHODS \
7657     ICOM_MSVTABLE_COMPAT_FIELDS \
7658     /*** IUnknown methods ***/ \
7659     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
7660     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
7661     STDMETHOD_(ULONG,Release)(THIS) PURE; \
7662     /*** IPSFactoryBuffer methods ***/ \
7663     STDMETHOD_(HRESULT,CreateProxy)(THIS_ IUnknown* pUnkOuter, REFIID riid, IRpcProxyBuffer** ppProxy, void** ppv) PURE; \
7664     STDMETHOD_(HRESULT,CreateStub)(THIS_ REFIID riid, IUnknown* pUnkServer, IRpcStubBuffer** ppStub) PURE;
7665
7666 HRESULT CALLBACK IPSFactoryBuffer_CreateProxy_Proxy(
7667     IPSFactoryBuffer* This,
7668     IUnknown* pUnkOuter,
7669     REFIID riid,
7670     IRpcProxyBuffer** ppProxy,
7671     void** ppv);
7672 void __RPC_STUB IPSFactoryBuffer_CreateProxy_Stub(
7673     struct IRpcStubBuffer* This,
7674     struct IRpcChannelBuffer* pRpcChannelBuffer,
7675     PRPC_MESSAGE pRpcMessage,
7676     DWORD* pdwStubPhase);
7677 HRESULT CALLBACK IPSFactoryBuffer_CreateStub_Proxy(
7678     IPSFactoryBuffer* This,
7679     REFIID riid,
7680     IUnknown* pUnkServer,
7681     IRpcStubBuffer** ppStub);
7682 void __RPC_STUB IPSFactoryBuffer_CreateStub_Stub(
7683     struct IRpcStubBuffer* This,
7684     struct IRpcChannelBuffer* pRpcChannelBuffer,
7685     PRPC_MESSAGE pRpcMessage,
7686     DWORD* pdwStubPhase);
7687
7688 typedef struct IChannelHook IChannelHook;
7689 typedef IChannelHook *LPCHANNELHOOK;
7690
7691 typedef struct SChannelHookCallInfo {
7692     IID iid;
7693     DWORD cbSize;
7694     GUID uCausality;
7695     DWORD dwServerPid;
7696     DWORD iMethod;
7697     void *pObject;
7698 } SChannelHookCallInfo;
7699
7700 /*****************************************************************************
7701  * IChannelHook interface
7702  */
7703 DEFINE_GUID(IID_IChannelHook, 0x1008c4a0, 0x7613, 0x11cf, 0x9a,0xf1, 0x00,0x20,0xaf,0x6e,0x72,0xf4);
7704 #if defined(__cplusplus) && !defined(CINTERFACE)
7705 struct IChannelHook : public IUnknown
7706 {
7707     virtual void STDMETHODCALLTYPE ClientGetSize(
7708         REFGUID uExtent,
7709         REFIID riid,
7710         ULONG* pDataSize) = 0;
7711
7712     virtual void STDMETHODCALLTYPE ClientFillBuffer(
7713         REFGUID uExtent,
7714         REFIID riid,
7715         ULONG* pDataSize,
7716         void* pDataBuffer) = 0;
7717
7718     virtual void STDMETHODCALLTYPE ClientNotify(
7719         REFGUID uExtent,
7720         REFIID riid,
7721         ULONG cbDataSize,
7722         void* pDataBuffer,
7723         DWORD lDataRep,
7724         HRESULT hrFault) = 0;
7725
7726     virtual void STDMETHODCALLTYPE ServerNotify(
7727         REFGUID uExtent,
7728         REFIID riid,
7729         ULONG cbDataSize,
7730         void* pDataBuffer,
7731         DWORD lDataRep) = 0;
7732
7733     virtual void STDMETHODCALLTYPE ServerGetSize(
7734         REFGUID uExtent,
7735         REFIID riid,
7736         HRESULT hrFault,
7737         ULONG* pDataSize) = 0;
7738
7739     virtual void STDMETHODCALLTYPE ServerFillBuffer(
7740         REFGUID uExtent,
7741         REFIID riid,
7742         ULONG* pDataSize,
7743         void* pDataBuffer,
7744         HRESULT hrFault) = 0;
7745
7746 };
7747 #else
7748 typedef struct IChannelHookVtbl IChannelHookVtbl;
7749 struct IChannelHook {
7750     const IChannelHookVtbl* lpVtbl;
7751 };
7752 struct IChannelHookVtbl {
7753     ICOM_MSVTABLE_COMPAT_FIELDS
7754
7755     /*** IUnknown methods ***/
7756     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
7757         IChannelHook* This,
7758         REFIID riid,
7759         void** ppvObject);
7760
7761     ULONG (STDMETHODCALLTYPE *AddRef)(
7762         IChannelHook* This);
7763
7764     ULONG (STDMETHODCALLTYPE *Release)(
7765         IChannelHook* This);
7766
7767     /*** IChannelHook methods ***/
7768     void (STDMETHODCALLTYPE *ClientGetSize)(
7769         IChannelHook* This,
7770         REFGUID uExtent,
7771         REFIID riid,
7772         ULONG* pDataSize);
7773
7774     void (STDMETHODCALLTYPE *ClientFillBuffer)(
7775         IChannelHook* This,
7776         REFGUID uExtent,
7777         REFIID riid,
7778         ULONG* pDataSize,
7779         void* pDataBuffer);
7780
7781     void (STDMETHODCALLTYPE *ClientNotify)(
7782         IChannelHook* This,
7783         REFGUID uExtent,
7784         REFIID riid,
7785         ULONG cbDataSize,
7786         void* pDataBuffer,
7787         DWORD lDataRep,
7788         HRESULT hrFault);
7789
7790     void (STDMETHODCALLTYPE *ServerNotify)(
7791         IChannelHook* This,
7792         REFGUID uExtent,
7793         REFIID riid,
7794         ULONG cbDataSize,
7795         void* pDataBuffer,
7796         DWORD lDataRep);
7797
7798     void (STDMETHODCALLTYPE *ServerGetSize)(
7799         IChannelHook* This,
7800         REFGUID uExtent,
7801         REFIID riid,
7802         HRESULT hrFault,
7803         ULONG* pDataSize);
7804
7805     void (STDMETHODCALLTYPE *ServerFillBuffer)(
7806         IChannelHook* This,
7807         REFGUID uExtent,
7808         REFIID riid,
7809         ULONG* pDataSize,
7810         void* pDataBuffer,
7811         HRESULT hrFault);
7812
7813 };
7814
7815 /*** IUnknown methods ***/
7816 #define IChannelHook_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
7817 #define IChannelHook_AddRef(p) (p)->lpVtbl->AddRef(p)
7818 #define IChannelHook_Release(p) (p)->lpVtbl->Release(p)
7819 /*** IChannelHook methods ***/
7820 #define IChannelHook_ClientGetSize(p,a,b,c) (p)->lpVtbl->ClientGetSize(p,a,b,c)
7821 #define IChannelHook_ClientFillBuffer(p,a,b,c,d) (p)->lpVtbl->ClientFillBuffer(p,a,b,c,d)
7822 #define IChannelHook_ClientNotify(p,a,b,c,d,e,f) (p)->lpVtbl->ClientNotify(p,a,b,c,d,e,f)
7823 #define IChannelHook_ServerNotify(p,a,b,c,d,e) (p)->lpVtbl->ServerNotify(p,a,b,c,d,e)
7824 #define IChannelHook_ServerGetSize(p,a,b,c,d) (p)->lpVtbl->ServerGetSize(p,a,b,c,d)
7825 #define IChannelHook_ServerFillBuffer(p,a,b,c,d,e) (p)->lpVtbl->ServerFillBuffer(p,a,b,c,d,e)
7826
7827 #endif
7828
7829 #define IChannelHook_METHODS \
7830     ICOM_MSVTABLE_COMPAT_FIELDS \
7831     /*** IUnknown methods ***/ \
7832     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
7833     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
7834     STDMETHOD_(ULONG,Release)(THIS) PURE; \
7835     /*** IChannelHook methods ***/ \
7836     STDMETHOD_(void,ClientGetSize)(THIS_ REFGUID uExtent, REFIID riid, ULONG* pDataSize) PURE; \
7837     STDMETHOD_(void,ClientFillBuffer)(THIS_ REFGUID uExtent, REFIID riid, ULONG* pDataSize, void* pDataBuffer) PURE; \
7838     STDMETHOD_(void,ClientNotify)(THIS_ REFGUID uExtent, REFIID riid, ULONG cbDataSize, void* pDataBuffer, DWORD lDataRep, HRESULT hrFault) PURE; \
7839     STDMETHOD_(void,ServerNotify)(THIS_ REFGUID uExtent, REFIID riid, ULONG cbDataSize, void* pDataBuffer, DWORD lDataRep) PURE; \
7840     STDMETHOD_(void,ServerGetSize)(THIS_ REFGUID uExtent, REFIID riid, HRESULT hrFault, ULONG* pDataSize) PURE; \
7841     STDMETHOD_(void,ServerFillBuffer)(THIS_ REFGUID uExtent, REFIID riid, ULONG* pDataSize, void* pDataBuffer, HRESULT hrFault) PURE;
7842
7843 void CALLBACK IChannelHook_ClientGetSize_Proxy(
7844     IChannelHook* This,
7845     REFGUID uExtent,
7846     REFIID riid,
7847     ULONG* pDataSize);
7848 void __RPC_STUB IChannelHook_ClientGetSize_Stub(
7849     struct IRpcStubBuffer* This,
7850     struct IRpcChannelBuffer* pRpcChannelBuffer,
7851     PRPC_MESSAGE pRpcMessage,
7852     DWORD* pdwStubPhase);
7853 void CALLBACK IChannelHook_ClientFillBuffer_Proxy(
7854     IChannelHook* This,
7855     REFGUID uExtent,
7856     REFIID riid,
7857     ULONG* pDataSize,
7858     void* pDataBuffer);
7859 void __RPC_STUB IChannelHook_ClientFillBuffer_Stub(
7860     struct IRpcStubBuffer* This,
7861     struct IRpcChannelBuffer* pRpcChannelBuffer,
7862     PRPC_MESSAGE pRpcMessage,
7863     DWORD* pdwStubPhase);
7864 void CALLBACK IChannelHook_ClientNotify_Proxy(
7865     IChannelHook* This,
7866     REFGUID uExtent,
7867     REFIID riid,
7868     ULONG cbDataSize,
7869     void* pDataBuffer,
7870     DWORD lDataRep,
7871     HRESULT hrFault);
7872 void __RPC_STUB IChannelHook_ClientNotify_Stub(
7873     struct IRpcStubBuffer* This,
7874     struct IRpcChannelBuffer* pRpcChannelBuffer,
7875     PRPC_MESSAGE pRpcMessage,
7876     DWORD* pdwStubPhase);
7877 void CALLBACK IChannelHook_ServerNotify_Proxy(
7878     IChannelHook* This,
7879     REFGUID uExtent,
7880     REFIID riid,
7881     ULONG cbDataSize,
7882     void* pDataBuffer,
7883     DWORD lDataRep);
7884 void __RPC_STUB IChannelHook_ServerNotify_Stub(
7885     struct IRpcStubBuffer* This,
7886     struct IRpcChannelBuffer* pRpcChannelBuffer,
7887     PRPC_MESSAGE pRpcMessage,
7888     DWORD* pdwStubPhase);
7889 void CALLBACK IChannelHook_ServerGetSize_Proxy(
7890     IChannelHook* This,
7891     REFGUID uExtent,
7892     REFIID riid,
7893     HRESULT hrFault,
7894     ULONG* pDataSize);
7895 void __RPC_STUB IChannelHook_ServerGetSize_Stub(
7896     struct IRpcStubBuffer* This,
7897     struct IRpcChannelBuffer* pRpcChannelBuffer,
7898     PRPC_MESSAGE pRpcMessage,
7899     DWORD* pdwStubPhase);
7900 void CALLBACK IChannelHook_ServerFillBuffer_Proxy(
7901     IChannelHook* This,
7902     REFGUID uExtent,
7903     REFIID riid,
7904     ULONG* pDataSize,
7905     void* pDataBuffer,
7906     HRESULT hrFault);
7907 void __RPC_STUB IChannelHook_ServerFillBuffer_Stub(
7908     struct IRpcStubBuffer* This,
7909     struct IRpcChannelBuffer* pRpcChannelBuffer,
7910     PRPC_MESSAGE pRpcMessage,
7911     DWORD* pdwStubPhase);
7912
7913 typedef struct IEnumSTATPROPSTG IEnumSTATPROPSTG;
7914 typedef struct IEnumSTATPROPSETSTG IEnumSTATPROPSETSTG;
7915 typedef struct IPropertyStorage IPropertyStorage;
7916 typedef IPropertyStorage *LPPROPERTYSTORAGE;
7917
7918 extern const FMTID FMTID_SummaryInformation;
7919
7920 extern const FMTID FMTID_DocSummaryInformation;
7921
7922 extern const FMTID FMTID_UserDefinedProperties;
7923
7924 #define PROPSETFLAG_DEFAULT (0)
7925
7926 #define PROPSETFLAG_NONSIMPLE (1)
7927
7928 #define PROPSETFLAG_ANSI (2)
7929
7930 #define PROPSETFLAG_UNBUFFERED (4)
7931
7932 typedef struct tagPROPVARIANT PROPVARIANT;
7933
7934 typedef struct tagCAUB {
7935     ULONG cElems;
7936     unsigned char *pElems;
7937 } CAUB;
7938
7939 typedef struct tagCAI {
7940     ULONG cElems;
7941     short *pElems;
7942 } CAI;
7943
7944 typedef struct tagCAUI {
7945     ULONG cElems;
7946     USHORT *pElems;
7947 } CAUI;
7948
7949 typedef struct tagCAL {
7950     ULONG cElems;
7951     long *pElems;
7952 } CAL;
7953
7954 typedef struct tagCAUL {
7955     ULONG cElems;
7956     ULONG *pElems;
7957 } CAUL;
7958
7959 typedef struct tagCAFLT {
7960     ULONG cElems;
7961     float *pElems;
7962 } CAFLT;
7963
7964 typedef struct tagCADBL {
7965     ULONG cElems;
7966     double *pElems;
7967 } CADBL;
7968
7969 typedef struct tagCACY {
7970     ULONG cElems;
7971     CY *pElems;
7972 } CACY;
7973
7974 typedef struct tagCADATE {
7975     ULONG cElems;
7976     DATE *pElems;
7977 } CADATE;
7978
7979 typedef struct tagCABSTR {
7980     ULONG cElems;
7981     BSTR *pElems;
7982 } CABSTR;
7983
7984 typedef struct tagCABSTRBLOB {
7985     ULONG cElems;
7986     BSTRBLOB *pElems;
7987 } CABSTRBLOB;
7988
7989 typedef struct tagCABOOL {
7990     ULONG cElems;
7991     VARIANT_BOOL *pElems;
7992 } CABOOL;
7993
7994 typedef struct tagCASCODE {
7995     ULONG cElems;
7996     SCODE *pElems;
7997 } CASCODE;
7998
7999 typedef struct tagCAPROPVARIANT {
8000     ULONG cElems;
8001     PROPVARIANT *pElems;
8002 } CAPROPVARIANT;
8003
8004 typedef struct tagCAH {
8005     ULONG cElems;
8006     LARGE_INTEGER *pElems;
8007 } CAH;
8008
8009 typedef struct tagCAUH {
8010     ULONG cElems;
8011     ULARGE_INTEGER *pElems;
8012 } CAUH;
8013
8014 typedef struct tagCALPSTR {
8015     ULONG cElems;
8016     LPSTR *pElems;
8017 } CALPSTR;
8018
8019 typedef struct tagCALPWSTR {
8020     ULONG cElems;
8021     LPWSTR *pElems;
8022 } CALPWSTR;
8023
8024 typedef struct tagCAFILETIME {
8025     ULONG cElems;
8026     FILETIME *pElems;
8027 } CAFILETIME;
8028
8029 typedef struct tagCACLIPDATA {
8030     ULONG cElems;
8031     CLIPDATA *pElems;
8032 } CACLIPDATA;
8033
8034 typedef struct tagCACLSID {
8035     ULONG cElems;
8036     CLSID *pElems;
8037 } CACLSID;
8038
8039 struct tagPROPVARIANT {
8040     VARTYPE vt;
8041     WORD wReserved1;
8042     WORD wReserved2;
8043     WORD wReserved3;
8044     union {
8045         UCHAR bVal;
8046         short iVal;
8047         USHORT uiVal;
8048         VARIANT_BOOL boolVal;
8049         long lVal;
8050         ULONG ulVal;
8051         float fltVal;
8052         SCODE scode;
8053         LARGE_INTEGER hVal;
8054         ULARGE_INTEGER uhVal;
8055         double dblVal;
8056         CY cyVal;
8057         DATE date;
8058         FILETIME filetime;
8059         CLSID *puuid;
8060         BLOB blob;
8061         CLIPDATA *pclipdata;
8062         IStream *pStream;
8063         IStorage *pStorage;
8064         BSTR bstrVal;
8065         BSTRBLOB bstrblobVal;
8066         LPSTR pszVal;
8067         LPWSTR pwszVal;
8068         CAUB caub;
8069         CAI cai;
8070         CAUI caui;
8071         CABOOL cabool;
8072         CAL cal;
8073         CAUL caul;
8074         CAFLT caflt;
8075         CASCODE cascode;
8076         CAH cah;
8077         CAUH cauh;
8078         CADBL cadbl;
8079         CACY cacy;
8080         CADATE cadate;
8081         CAFILETIME cafiletime;
8082         CACLSID cauuid;
8083         CACLIPDATA caclipdata;
8084         CABSTR cabstr;
8085         CABSTRBLOB cabstrblob;
8086         CALPSTR calpstr;
8087         CALPWSTR calpwstr;
8088         CAPROPVARIANT capropvar;
8089     } DUMMYUNIONNAME;
8090 };
8091
8092 typedef struct tagPROPVARIANT *LPPROPVARIANT;
8093
8094 #define PRSPEC_INVALID (0x7fffffff)
8095
8096 #define PRSPEC_LPWSTR (0)
8097
8098 #define PRSPEC_PROPID (1)
8099
8100 typedef struct tagPROPSPEC {
8101     ULONG ulKind;
8102     union {
8103         PROPID propid;
8104         LPOLESTR lpwstr;
8105     } DUMMYUNIONNAME;
8106 } PROPSPEC;
8107
8108 typedef struct tagSTATPROPSTG {
8109     LPOLESTR lpwstrName;
8110     PROPID propid;
8111     VARTYPE vt;
8112 } STATPROPSTG;
8113
8114 typedef struct tagSTATPROPSETSTG {
8115     FMTID fmtid;
8116     CLSID clsid;
8117     DWORD grfFlags;
8118     FILETIME mtime;
8119     FILETIME ctime;
8120     FILETIME atime;
8121     DWORD dwOSVersion;
8122 } STATPROPSETSTG;
8123
8124 /*****************************************************************************
8125  * IPropertyStorage interface
8126  */
8127 DEFINE_GUID(IID_IPropertyStorage, 0x00000138, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
8128 #if defined(__cplusplus) && !defined(CINTERFACE)
8129 struct IPropertyStorage : public IUnknown
8130 {
8131     virtual HRESULT STDMETHODCALLTYPE ReadMultiple(
8132         ULONG cpspec,
8133         const PROPSPEC rgpspec[],
8134         PROPVARIANT rgpropvar[]) = 0;
8135
8136     virtual HRESULT STDMETHODCALLTYPE WriteMultiple(
8137         ULONG cpspec,
8138         const PROPSPEC rgpspec[],
8139         const PROPVARIANT rgpropvar[],
8140         PROPID propidNameFirst) = 0;
8141
8142     virtual HRESULT STDMETHODCALLTYPE DeleteMultiple(
8143         ULONG cpspec,
8144         const PROPSPEC rgpspec[]) = 0;
8145
8146     virtual HRESULT STDMETHODCALLTYPE ReadPropertyNames(
8147         ULONG cpropid,
8148         const PROPID rgpropid[],
8149         LPOLESTR rglpwstrName[]) = 0;
8150
8151     virtual HRESULT STDMETHODCALLTYPE WritePropertyNames(
8152         ULONG cpropid,
8153         const PROPID rgpropid[],
8154         const LPOLESTR rglpwstrName[]) = 0;
8155
8156     virtual HRESULT STDMETHODCALLTYPE DeletePropertyNames(
8157         ULONG cpropid,
8158         const PROPID rgpropid[]) = 0;
8159
8160     virtual HRESULT STDMETHODCALLTYPE Commit(
8161         DWORD grfCommitFlags) = 0;
8162
8163     virtual HRESULT STDMETHODCALLTYPE Revert(
8164         ) = 0;
8165
8166     virtual HRESULT STDMETHODCALLTYPE Enum(
8167         IEnumSTATPROPSTG** ppenum) = 0;
8168
8169     virtual HRESULT STDMETHODCALLTYPE SetTimes(
8170         const FILETIME* pctime,
8171         const FILETIME* patime,
8172         const FILETIME* pmtime) = 0;
8173
8174     virtual HRESULT STDMETHODCALLTYPE SetClass(
8175         REFCLSID clsid) = 0;
8176
8177     virtual HRESULT STDMETHODCALLTYPE Stat(
8178         STATPROPSETSTG* statpsstg) = 0;
8179
8180 };
8181 #else
8182 typedef struct IPropertyStorageVtbl IPropertyStorageVtbl;
8183 struct IPropertyStorage {
8184     const IPropertyStorageVtbl* lpVtbl;
8185 };
8186 struct IPropertyStorageVtbl {
8187     ICOM_MSVTABLE_COMPAT_FIELDS
8188
8189     /*** IUnknown methods ***/
8190     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
8191         IPropertyStorage* This,
8192         REFIID riid,
8193         void** ppvObject);
8194
8195     ULONG (STDMETHODCALLTYPE *AddRef)(
8196         IPropertyStorage* This);
8197
8198     ULONG (STDMETHODCALLTYPE *Release)(
8199         IPropertyStorage* This);
8200
8201     /*** IPropertyStorage methods ***/
8202     HRESULT (STDMETHODCALLTYPE *ReadMultiple)(
8203         IPropertyStorage* This,
8204         ULONG cpspec,
8205         const PROPSPEC rgpspec[],
8206         PROPVARIANT rgpropvar[]);
8207
8208     HRESULT (STDMETHODCALLTYPE *WriteMultiple)(
8209         IPropertyStorage* This,
8210         ULONG cpspec,
8211         const PROPSPEC rgpspec[],
8212         const PROPVARIANT rgpropvar[],
8213         PROPID propidNameFirst);
8214
8215     HRESULT (STDMETHODCALLTYPE *DeleteMultiple)(
8216         IPropertyStorage* This,
8217         ULONG cpspec,
8218         const PROPSPEC rgpspec[]);
8219
8220     HRESULT (STDMETHODCALLTYPE *ReadPropertyNames)(
8221         IPropertyStorage* This,
8222         ULONG cpropid,
8223         const PROPID rgpropid[],
8224         LPOLESTR rglpwstrName[]);
8225
8226     HRESULT (STDMETHODCALLTYPE *WritePropertyNames)(
8227         IPropertyStorage* This,
8228         ULONG cpropid,
8229         const PROPID rgpropid[],
8230         const LPOLESTR rglpwstrName[]);
8231
8232     HRESULT (STDMETHODCALLTYPE *DeletePropertyNames)(
8233         IPropertyStorage* This,
8234         ULONG cpropid,
8235         const PROPID rgpropid[]);
8236
8237     HRESULT (STDMETHODCALLTYPE *Commit)(
8238         IPropertyStorage* This,
8239         DWORD grfCommitFlags);
8240
8241     HRESULT (STDMETHODCALLTYPE *Revert)(
8242         IPropertyStorage* This);
8243
8244     HRESULT (STDMETHODCALLTYPE *Enum)(
8245         IPropertyStorage* This,
8246         IEnumSTATPROPSTG** ppenum);
8247
8248     HRESULT (STDMETHODCALLTYPE *SetTimes)(
8249         IPropertyStorage* This,
8250         const FILETIME* pctime,
8251         const FILETIME* patime,
8252         const FILETIME* pmtime);
8253
8254     HRESULT (STDMETHODCALLTYPE *SetClass)(
8255         IPropertyStorage* This,
8256         REFCLSID clsid);
8257
8258     HRESULT (STDMETHODCALLTYPE *Stat)(
8259         IPropertyStorage* This,
8260         STATPROPSETSTG* statpsstg);
8261
8262 };
8263
8264 /*** IUnknown methods ***/
8265 #define IPropertyStorage_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
8266 #define IPropertyStorage_AddRef(p) (p)->lpVtbl->AddRef(p)
8267 #define IPropertyStorage_Release(p) (p)->lpVtbl->Release(p)
8268 /*** IPropertyStorage methods ***/
8269 #define IPropertyStorage_ReadMultiple(p,a,b,c) (p)->lpVtbl->ReadMultiple(p,a,b,c)
8270 #define IPropertyStorage_WriteMultiple(p,a,b,c,d) (p)->lpVtbl->WriteMultiple(p,a,b,c,d)
8271 #define IPropertyStorage_DeleteMultiple(p,a,b) (p)->lpVtbl->DeleteMultiple(p,a,b)
8272 #define IPropertyStorage_ReadPropertyNames(p,a,b,c) (p)->lpVtbl->ReadPropertyNames(p,a,b,c)
8273 #define IPropertyStorage_WritePropertyNames(p,a,b,c) (p)->lpVtbl->WritePropertyNames(p,a,b,c)
8274 #define IPropertyStorage_DeletePropertyNames(p,a,b) (p)->lpVtbl->DeletePropertyNames(p,a,b)
8275 #define IPropertyStorage_Commit(p,a) (p)->lpVtbl->Commit(p,a)
8276 #define IPropertyStorage_Revert(p) (p)->lpVtbl->Revert(p)
8277 #define IPropertyStorage_Enum(p,a) (p)->lpVtbl->Enum(p,a)
8278 #define IPropertyStorage_SetTimes(p,a,b,c) (p)->lpVtbl->SetTimes(p,a,b,c)
8279 #define IPropertyStorage_SetClass(p,a) (p)->lpVtbl->SetClass(p,a)
8280 #define IPropertyStorage_Stat(p,a) (p)->lpVtbl->Stat(p,a)
8281
8282 #endif
8283
8284 #define IPropertyStorage_METHODS \
8285     ICOM_MSVTABLE_COMPAT_FIELDS \
8286     /*** IUnknown methods ***/ \
8287     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
8288     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
8289     STDMETHOD_(ULONG,Release)(THIS) PURE; \
8290     /*** IPropertyStorage methods ***/ \
8291     STDMETHOD_(HRESULT,ReadMultiple)(THIS_ ULONG cpspec, const PROPSPEC rgpspec[], PROPVARIANT rgpropvar[]) PURE; \
8292     STDMETHOD_(HRESULT,WriteMultiple)(THIS_ ULONG cpspec, const PROPSPEC rgpspec[], const PROPVARIANT rgpropvar[], PROPID propidNameFirst) PURE; \
8293     STDMETHOD_(HRESULT,DeleteMultiple)(THIS_ ULONG cpspec, const PROPSPEC rgpspec[]) PURE; \
8294     STDMETHOD_(HRESULT,ReadPropertyNames)(THIS_ ULONG cpropid, const PROPID rgpropid[], LPOLESTR rglpwstrName[]) PURE; \
8295     STDMETHOD_(HRESULT,WritePropertyNames)(THIS_ ULONG cpropid, const PROPID rgpropid[], const LPOLESTR rglpwstrName[]) PURE; \
8296     STDMETHOD_(HRESULT,DeletePropertyNames)(THIS_ ULONG cpropid, const PROPID rgpropid[]) PURE; \
8297     STDMETHOD_(HRESULT,Commit)(THIS_ DWORD grfCommitFlags) PURE; \
8298     STDMETHOD_(HRESULT,Revert)(THIS) PURE; \
8299     STDMETHOD_(HRESULT,Enum)(THIS_ IEnumSTATPROPSTG** ppenum) PURE; \
8300     STDMETHOD_(HRESULT,SetTimes)(THIS_ const FILETIME* pctime, const FILETIME* patime, const FILETIME* pmtime) PURE; \
8301     STDMETHOD_(HRESULT,SetClass)(THIS_ REFCLSID clsid) PURE; \
8302     STDMETHOD_(HRESULT,Stat)(THIS_ STATPROPSETSTG* statpsstg) PURE;
8303
8304 HRESULT CALLBACK IPropertyStorage_ReadMultiple_Proxy(
8305     IPropertyStorage* This,
8306     ULONG cpspec,
8307     const PROPSPEC rgpspec[],
8308     PROPVARIANT rgpropvar[]);
8309 void __RPC_STUB IPropertyStorage_ReadMultiple_Stub(
8310     struct IRpcStubBuffer* This,
8311     struct IRpcChannelBuffer* pRpcChannelBuffer,
8312     PRPC_MESSAGE pRpcMessage,
8313     DWORD* pdwStubPhase);
8314 HRESULT CALLBACK IPropertyStorage_WriteMultiple_Proxy(
8315     IPropertyStorage* This,
8316     ULONG cpspec,
8317     const PROPSPEC rgpspec[],
8318     const PROPVARIANT rgpropvar[],
8319     PROPID propidNameFirst);
8320 void __RPC_STUB IPropertyStorage_WriteMultiple_Stub(
8321     struct IRpcStubBuffer* This,
8322     struct IRpcChannelBuffer* pRpcChannelBuffer,
8323     PRPC_MESSAGE pRpcMessage,
8324     DWORD* pdwStubPhase);
8325 HRESULT CALLBACK IPropertyStorage_DeleteMultiple_Proxy(
8326     IPropertyStorage* This,
8327     ULONG cpspec,
8328     const PROPSPEC rgpspec[]);
8329 void __RPC_STUB IPropertyStorage_DeleteMultiple_Stub(
8330     struct IRpcStubBuffer* This,
8331     struct IRpcChannelBuffer* pRpcChannelBuffer,
8332     PRPC_MESSAGE pRpcMessage,
8333     DWORD* pdwStubPhase);
8334 HRESULT CALLBACK IPropertyStorage_ReadPropertyNames_Proxy(
8335     IPropertyStorage* This,
8336     ULONG cpropid,
8337     const PROPID rgpropid[],
8338     LPOLESTR rglpwstrName[]);
8339 void __RPC_STUB IPropertyStorage_ReadPropertyNames_Stub(
8340     struct IRpcStubBuffer* This,
8341     struct IRpcChannelBuffer* pRpcChannelBuffer,
8342     PRPC_MESSAGE pRpcMessage,
8343     DWORD* pdwStubPhase);
8344 HRESULT CALLBACK IPropertyStorage_WritePropertyNames_Proxy(
8345     IPropertyStorage* This,
8346     ULONG cpropid,
8347     const PROPID rgpropid[],
8348     const LPOLESTR rglpwstrName[]);
8349 void __RPC_STUB IPropertyStorage_WritePropertyNames_Stub(
8350     struct IRpcStubBuffer* This,
8351     struct IRpcChannelBuffer* pRpcChannelBuffer,
8352     PRPC_MESSAGE pRpcMessage,
8353     DWORD* pdwStubPhase);
8354 HRESULT CALLBACK IPropertyStorage_DeletePropertyNames_Proxy(
8355     IPropertyStorage* This,
8356     ULONG cpropid,
8357     const PROPID rgpropid[]);
8358 void __RPC_STUB IPropertyStorage_DeletePropertyNames_Stub(
8359     struct IRpcStubBuffer* This,
8360     struct IRpcChannelBuffer* pRpcChannelBuffer,
8361     PRPC_MESSAGE pRpcMessage,
8362     DWORD* pdwStubPhase);
8363 HRESULT CALLBACK IPropertyStorage_Commit_Proxy(
8364     IPropertyStorage* This,
8365     DWORD grfCommitFlags);
8366 void __RPC_STUB IPropertyStorage_Commit_Stub(
8367     struct IRpcStubBuffer* This,
8368     struct IRpcChannelBuffer* pRpcChannelBuffer,
8369     PRPC_MESSAGE pRpcMessage,
8370     DWORD* pdwStubPhase);
8371 HRESULT CALLBACK IPropertyStorage_Revert_Proxy(
8372     IPropertyStorage* This);
8373 void __RPC_STUB IPropertyStorage_Revert_Stub(
8374     struct IRpcStubBuffer* This,
8375     struct IRpcChannelBuffer* pRpcChannelBuffer,
8376     PRPC_MESSAGE pRpcMessage,
8377     DWORD* pdwStubPhase);
8378 HRESULT CALLBACK IPropertyStorage_Enum_Proxy(
8379     IPropertyStorage* This,
8380     IEnumSTATPROPSTG** ppenum);
8381 void __RPC_STUB IPropertyStorage_Enum_Stub(
8382     struct IRpcStubBuffer* This,
8383     struct IRpcChannelBuffer* pRpcChannelBuffer,
8384     PRPC_MESSAGE pRpcMessage,
8385     DWORD* pdwStubPhase);
8386 HRESULT CALLBACK IPropertyStorage_SetTimes_Proxy(
8387     IPropertyStorage* This,
8388     const FILETIME* pctime,
8389     const FILETIME* patime,
8390     const FILETIME* pmtime);
8391 void __RPC_STUB IPropertyStorage_SetTimes_Stub(
8392     struct IRpcStubBuffer* This,
8393     struct IRpcChannelBuffer* pRpcChannelBuffer,
8394     PRPC_MESSAGE pRpcMessage,
8395     DWORD* pdwStubPhase);
8396 HRESULT CALLBACK IPropertyStorage_SetClass_Proxy(
8397     IPropertyStorage* This,
8398     REFCLSID clsid);
8399 void __RPC_STUB IPropertyStorage_SetClass_Stub(
8400     struct IRpcStubBuffer* This,
8401     struct IRpcChannelBuffer* pRpcChannelBuffer,
8402     PRPC_MESSAGE pRpcMessage,
8403     DWORD* pdwStubPhase);
8404 HRESULT CALLBACK IPropertyStorage_Stat_Proxy(
8405     IPropertyStorage* This,
8406     STATPROPSETSTG* statpsstg);
8407 void __RPC_STUB IPropertyStorage_Stat_Stub(
8408     struct IRpcStubBuffer* This,
8409     struct IRpcChannelBuffer* pRpcChannelBuffer,
8410     PRPC_MESSAGE pRpcMessage,
8411     DWORD* pdwStubPhase);
8412
8413 typedef struct IPropertySetStorage IPropertySetStorage;
8414 typedef IPropertySetStorage *LPPROPERTYSETSTORAGE;
8415
8416 /*****************************************************************************
8417  * IPropertySetStorage interface
8418  */
8419 DEFINE_GUID(IID_IPropertySetStorage, 0x0000013a, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
8420 #if defined(__cplusplus) && !defined(CINTERFACE)
8421 struct IPropertySetStorage : public IUnknown
8422 {
8423     virtual HRESULT STDMETHODCALLTYPE Create(
8424         REFFMTID rfmtid,
8425         const CLSID* pclsid,
8426         DWORD grfFlags,
8427         DWORD grfMode,
8428         IPropertyStorage** ppprstg) = 0;
8429
8430     virtual HRESULT STDMETHODCALLTYPE Open(
8431         REFFMTID rfmtid,
8432         DWORD grfMode,
8433         IPropertyStorage** ppprstg) = 0;
8434
8435     virtual HRESULT STDMETHODCALLTYPE Delete(
8436         REFFMTID rfmtid) = 0;
8437
8438     virtual HRESULT STDMETHODCALLTYPE Enum(
8439         IEnumSTATPROPSETSTG** ppenum) = 0;
8440
8441 };
8442 #else
8443 typedef struct IPropertySetStorageVtbl IPropertySetStorageVtbl;
8444 struct IPropertySetStorage {
8445     const IPropertySetStorageVtbl* lpVtbl;
8446 };
8447 struct IPropertySetStorageVtbl {
8448     ICOM_MSVTABLE_COMPAT_FIELDS
8449
8450     /*** IUnknown methods ***/
8451     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
8452         IPropertySetStorage* This,
8453         REFIID riid,
8454         void** ppvObject);
8455
8456     ULONG (STDMETHODCALLTYPE *AddRef)(
8457         IPropertySetStorage* This);
8458
8459     ULONG (STDMETHODCALLTYPE *Release)(
8460         IPropertySetStorage* This);
8461
8462     /*** IPropertySetStorage methods ***/
8463     HRESULT (STDMETHODCALLTYPE *Create)(
8464         IPropertySetStorage* This,
8465         REFFMTID rfmtid,
8466         const CLSID* pclsid,
8467         DWORD grfFlags,
8468         DWORD grfMode,
8469         IPropertyStorage** ppprstg);
8470
8471     HRESULT (STDMETHODCALLTYPE *Open)(
8472         IPropertySetStorage* This,
8473         REFFMTID rfmtid,
8474         DWORD grfMode,
8475         IPropertyStorage** ppprstg);
8476
8477     HRESULT (STDMETHODCALLTYPE *Delete)(
8478         IPropertySetStorage* This,
8479         REFFMTID rfmtid);
8480
8481     HRESULT (STDMETHODCALLTYPE *Enum)(
8482         IPropertySetStorage* This,
8483         IEnumSTATPROPSETSTG** ppenum);
8484
8485 };
8486
8487 /*** IUnknown methods ***/
8488 #define IPropertySetStorage_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
8489 #define IPropertySetStorage_AddRef(p) (p)->lpVtbl->AddRef(p)
8490 #define IPropertySetStorage_Release(p) (p)->lpVtbl->Release(p)
8491 /*** IPropertySetStorage methods ***/
8492 #define IPropertySetStorage_Create(p,a,b,c,d,e) (p)->lpVtbl->Create(p,a,b,c,d,e)
8493 #define IPropertySetStorage_Open(p,a,b,c) (p)->lpVtbl->Open(p,a,b,c)
8494 #define IPropertySetStorage_Delete(p,a) (p)->lpVtbl->Delete(p,a)
8495 #define IPropertySetStorage_Enum(p,a) (p)->lpVtbl->Enum(p,a)
8496
8497 #endif
8498
8499 #define IPropertySetStorage_METHODS \
8500     ICOM_MSVTABLE_COMPAT_FIELDS \
8501     /*** IUnknown methods ***/ \
8502     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
8503     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
8504     STDMETHOD_(ULONG,Release)(THIS) PURE; \
8505     /*** IPropertySetStorage methods ***/ \
8506     STDMETHOD_(HRESULT,Create)(THIS_ REFFMTID rfmtid, const CLSID* pclsid, DWORD grfFlags, DWORD grfMode, IPropertyStorage** ppprstg) PURE; \
8507     STDMETHOD_(HRESULT,Open)(THIS_ REFFMTID rfmtid, DWORD grfMode, IPropertyStorage** ppprstg) PURE; \
8508     STDMETHOD_(HRESULT,Delete)(THIS_ REFFMTID rfmtid) PURE; \
8509     STDMETHOD_(HRESULT,Enum)(THIS_ IEnumSTATPROPSETSTG** ppenum) PURE;
8510
8511 HRESULT CALLBACK IPropertySetStorage_Create_Proxy(
8512     IPropertySetStorage* This,
8513     REFFMTID rfmtid,
8514     const CLSID* pclsid,
8515     DWORD grfFlags,
8516     DWORD grfMode,
8517     IPropertyStorage** ppprstg);
8518 void __RPC_STUB IPropertySetStorage_Create_Stub(
8519     struct IRpcStubBuffer* This,
8520     struct IRpcChannelBuffer* pRpcChannelBuffer,
8521     PRPC_MESSAGE pRpcMessage,
8522     DWORD* pdwStubPhase);
8523 HRESULT CALLBACK IPropertySetStorage_Open_Proxy(
8524     IPropertySetStorage* This,
8525     REFFMTID rfmtid,
8526     DWORD grfMode,
8527     IPropertyStorage** ppprstg);
8528 void __RPC_STUB IPropertySetStorage_Open_Stub(
8529     struct IRpcStubBuffer* This,
8530     struct IRpcChannelBuffer* pRpcChannelBuffer,
8531     PRPC_MESSAGE pRpcMessage,
8532     DWORD* pdwStubPhase);
8533 HRESULT CALLBACK IPropertySetStorage_Delete_Proxy(
8534     IPropertySetStorage* This,
8535     REFFMTID rfmtid);
8536 void __RPC_STUB IPropertySetStorage_Delete_Stub(
8537     struct IRpcStubBuffer* This,
8538     struct IRpcChannelBuffer* pRpcChannelBuffer,
8539     PRPC_MESSAGE pRpcMessage,
8540     DWORD* pdwStubPhase);
8541 HRESULT CALLBACK IPropertySetStorage_Enum_Proxy(
8542     IPropertySetStorage* This,
8543     IEnumSTATPROPSETSTG** ppenum);
8544 void __RPC_STUB IPropertySetStorage_Enum_Stub(
8545     struct IRpcStubBuffer* This,
8546     struct IRpcChannelBuffer* pRpcChannelBuffer,
8547     PRPC_MESSAGE pRpcMessage,
8548     DWORD* pdwStubPhase);
8549
8550 typedef IEnumSTATPROPSTG *LPENUMSTATPROPSTG;
8551
8552 /*****************************************************************************
8553  * IEnumSTATPROPSTG interface
8554  */
8555 DEFINE_GUID(IID_IEnumSTATPROPSTG, 0x00000139, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
8556 #if defined(__cplusplus) && !defined(CINTERFACE)
8557 struct IEnumSTATPROPSTG : public IUnknown
8558 {
8559     virtual HRESULT STDMETHODCALLTYPE Next(
8560         ULONG celt,
8561         STATPROPSTG* rgelt,
8562         ULONG* pceltFetched) = 0;
8563
8564     virtual HRESULT STDMETHODCALLTYPE Skip(
8565         ULONG celt) = 0;
8566
8567     virtual HRESULT STDMETHODCALLTYPE Reset(
8568         ) = 0;
8569
8570     virtual HRESULT STDMETHODCALLTYPE Clone(
8571         IEnumSTATPROPSTG** ppenum) = 0;
8572
8573 };
8574 #else
8575 typedef struct IEnumSTATPROPSTGVtbl IEnumSTATPROPSTGVtbl;
8576 struct IEnumSTATPROPSTG {
8577     const IEnumSTATPROPSTGVtbl* lpVtbl;
8578 };
8579 struct IEnumSTATPROPSTGVtbl {
8580     ICOM_MSVTABLE_COMPAT_FIELDS
8581
8582     /*** IUnknown methods ***/
8583     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
8584         IEnumSTATPROPSTG* This,
8585         REFIID riid,
8586         void** ppvObject);
8587
8588     ULONG (STDMETHODCALLTYPE *AddRef)(
8589         IEnumSTATPROPSTG* This);
8590
8591     ULONG (STDMETHODCALLTYPE *Release)(
8592         IEnumSTATPROPSTG* This);
8593
8594     /*** IEnumSTATPROPSTG methods ***/
8595     HRESULT (STDMETHODCALLTYPE *Next)(
8596         IEnumSTATPROPSTG* This,
8597         ULONG celt,
8598         STATPROPSTG* rgelt,
8599         ULONG* pceltFetched);
8600
8601     HRESULT (STDMETHODCALLTYPE *Skip)(
8602         IEnumSTATPROPSTG* This,
8603         ULONG celt);
8604
8605     HRESULT (STDMETHODCALLTYPE *Reset)(
8606         IEnumSTATPROPSTG* This);
8607
8608     HRESULT (STDMETHODCALLTYPE *Clone)(
8609         IEnumSTATPROPSTG* This,
8610         IEnumSTATPROPSTG** ppenum);
8611
8612 };
8613
8614 /*** IUnknown methods ***/
8615 #define IEnumSTATPROPSTG_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
8616 #define IEnumSTATPROPSTG_AddRef(p) (p)->lpVtbl->AddRef(p)
8617 #define IEnumSTATPROPSTG_Release(p) (p)->lpVtbl->Release(p)
8618 /*** IEnumSTATPROPSTG methods ***/
8619 #define IEnumSTATPROPSTG_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
8620 #define IEnumSTATPROPSTG_Skip(p,a) (p)->lpVtbl->Skip(p,a)
8621 #define IEnumSTATPROPSTG_Reset(p) (p)->lpVtbl->Reset(p)
8622 #define IEnumSTATPROPSTG_Clone(p,a) (p)->lpVtbl->Clone(p,a)
8623
8624 #endif
8625
8626 #define IEnumSTATPROPSTG_METHODS \
8627     ICOM_MSVTABLE_COMPAT_FIELDS \
8628     /*** IUnknown methods ***/ \
8629     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
8630     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
8631     STDMETHOD_(ULONG,Release)(THIS) PURE; \
8632     /*** IEnumSTATPROPSTG methods ***/ \
8633     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, STATPROPSTG* rgelt, ULONG* pceltFetched) PURE; \
8634     STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
8635     STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
8636     STDMETHOD_(HRESULT,Clone)(THIS_ IEnumSTATPROPSTG** ppenum) PURE;
8637
8638 HRESULT CALLBACK IEnumSTATPROPSTG_RemoteNext_Proxy(
8639     IEnumSTATPROPSTG* This,
8640     ULONG celt,
8641     STATPROPSTG* rgelt,
8642     ULONG* pceltFetched);
8643 void __RPC_STUB IEnumSTATPROPSTG_RemoteNext_Stub(
8644     struct IRpcStubBuffer* This,
8645     struct IRpcChannelBuffer* pRpcChannelBuffer,
8646     PRPC_MESSAGE pRpcMessage,
8647     DWORD* pdwStubPhase);
8648 HRESULT CALLBACK IEnumSTATPROPSTG_Next_Proxy(
8649     IEnumSTATPROPSTG* This,
8650     ULONG celt,
8651     STATPROPSTG* rgelt,
8652     ULONG* pceltFetched);
8653 HRESULT __RPC_STUB IEnumSTATPROPSTG_Next_Stub(
8654     IEnumSTATPROPSTG* This,
8655     ULONG celt,
8656     STATPROPSTG* rgelt,
8657     ULONG* pceltFetched);
8658 HRESULT CALLBACK IEnumSTATPROPSTG_Skip_Proxy(
8659     IEnumSTATPROPSTG* This,
8660     ULONG celt);
8661 void __RPC_STUB IEnumSTATPROPSTG_Skip_Stub(
8662     struct IRpcStubBuffer* This,
8663     struct IRpcChannelBuffer* pRpcChannelBuffer,
8664     PRPC_MESSAGE pRpcMessage,
8665     DWORD* pdwStubPhase);
8666 HRESULT CALLBACK IEnumSTATPROPSTG_Reset_Proxy(
8667     IEnumSTATPROPSTG* This);
8668 void __RPC_STUB IEnumSTATPROPSTG_Reset_Stub(
8669     struct IRpcStubBuffer* This,
8670     struct IRpcChannelBuffer* pRpcChannelBuffer,
8671     PRPC_MESSAGE pRpcMessage,
8672     DWORD* pdwStubPhase);
8673 HRESULT CALLBACK IEnumSTATPROPSTG_Clone_Proxy(
8674     IEnumSTATPROPSTG* This,
8675     IEnumSTATPROPSTG** ppenum);
8676 void __RPC_STUB IEnumSTATPROPSTG_Clone_Stub(
8677     struct IRpcStubBuffer* This,
8678     struct IRpcChannelBuffer* pRpcChannelBuffer,
8679     PRPC_MESSAGE pRpcMessage,
8680     DWORD* pdwStubPhase);
8681
8682 typedef IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
8683
8684 /*****************************************************************************
8685  * IEnumSTATPROPSETSTG interface
8686  */
8687 DEFINE_GUID(IID_IEnumSTATPROPSETSTG, 0x0000013b, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
8688 #if defined(__cplusplus) && !defined(CINTERFACE)
8689 struct IEnumSTATPROPSETSTG : public IUnknown
8690 {
8691     virtual HRESULT STDMETHODCALLTYPE Next(
8692         ULONG celt,
8693         STATPROPSETSTG* rgelt,
8694         ULONG* pceltFetched) = 0;
8695
8696     virtual HRESULT STDMETHODCALLTYPE Skip(
8697         ULONG celt) = 0;
8698
8699     virtual HRESULT STDMETHODCALLTYPE Reset(
8700         ) = 0;
8701
8702     virtual HRESULT STDMETHODCALLTYPE Clone(
8703         IEnumSTATPROPSETSTG** ppenum) = 0;
8704
8705 };
8706 #else
8707 typedef struct IEnumSTATPROPSETSTGVtbl IEnumSTATPROPSETSTGVtbl;
8708 struct IEnumSTATPROPSETSTG {
8709     const IEnumSTATPROPSETSTGVtbl* lpVtbl;
8710 };
8711 struct IEnumSTATPROPSETSTGVtbl {
8712     ICOM_MSVTABLE_COMPAT_FIELDS
8713
8714     /*** IUnknown methods ***/
8715     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
8716         IEnumSTATPROPSETSTG* This,
8717         REFIID riid,
8718         void** ppvObject);
8719
8720     ULONG (STDMETHODCALLTYPE *AddRef)(
8721         IEnumSTATPROPSETSTG* This);
8722
8723     ULONG (STDMETHODCALLTYPE *Release)(
8724         IEnumSTATPROPSETSTG* This);
8725
8726     /*** IEnumSTATPROPSETSTG methods ***/
8727     HRESULT (STDMETHODCALLTYPE *Next)(
8728         IEnumSTATPROPSETSTG* This,
8729         ULONG celt,
8730         STATPROPSETSTG* rgelt,
8731         ULONG* pceltFetched);
8732
8733     HRESULT (STDMETHODCALLTYPE *Skip)(
8734         IEnumSTATPROPSETSTG* This,
8735         ULONG celt);
8736
8737     HRESULT (STDMETHODCALLTYPE *Reset)(
8738         IEnumSTATPROPSETSTG* This);
8739
8740     HRESULT (STDMETHODCALLTYPE *Clone)(
8741         IEnumSTATPROPSETSTG* This,
8742         IEnumSTATPROPSETSTG** ppenum);
8743
8744 };
8745
8746 /*** IUnknown methods ***/
8747 #define IEnumSTATPROPSETSTG_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
8748 #define IEnumSTATPROPSETSTG_AddRef(p) (p)->lpVtbl->AddRef(p)
8749 #define IEnumSTATPROPSETSTG_Release(p) (p)->lpVtbl->Release(p)
8750 /*** IEnumSTATPROPSETSTG methods ***/
8751 #define IEnumSTATPROPSETSTG_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
8752 #define IEnumSTATPROPSETSTG_Skip(p,a) (p)->lpVtbl->Skip(p,a)
8753 #define IEnumSTATPROPSETSTG_Reset(p) (p)->lpVtbl->Reset(p)
8754 #define IEnumSTATPROPSETSTG_Clone(p,a) (p)->lpVtbl->Clone(p,a)
8755
8756 #endif
8757
8758 #define IEnumSTATPROPSETSTG_METHODS \
8759     ICOM_MSVTABLE_COMPAT_FIELDS \
8760     /*** IUnknown methods ***/ \
8761     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
8762     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
8763     STDMETHOD_(ULONG,Release)(THIS) PURE; \
8764     /*** IEnumSTATPROPSETSTG methods ***/ \
8765     STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, STATPROPSETSTG* rgelt, ULONG* pceltFetched) PURE; \
8766     STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
8767     STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
8768     STDMETHOD_(HRESULT,Clone)(THIS_ IEnumSTATPROPSETSTG** ppenum) PURE;
8769
8770 HRESULT CALLBACK IEnumSTATPROPSETSTG_RemoteNext_Proxy(
8771     IEnumSTATPROPSETSTG* This,
8772     ULONG celt,
8773     STATPROPSETSTG* rgelt,
8774     ULONG* pceltFetched);
8775 void __RPC_STUB IEnumSTATPROPSETSTG_RemoteNext_Stub(
8776     struct IRpcStubBuffer* This,
8777     struct IRpcChannelBuffer* pRpcChannelBuffer,
8778     PRPC_MESSAGE pRpcMessage,
8779     DWORD* pdwStubPhase);
8780 HRESULT CALLBACK IEnumSTATPROPSETSTG_Next_Proxy(
8781     IEnumSTATPROPSETSTG* This,
8782     ULONG celt,
8783     STATPROPSETSTG* rgelt,
8784     ULONG* pceltFetched);
8785 HRESULT __RPC_STUB IEnumSTATPROPSETSTG_Next_Stub(
8786     IEnumSTATPROPSETSTG* This,
8787     ULONG celt,
8788     STATPROPSETSTG* rgelt,
8789     ULONG* pceltFetched);
8790 HRESULT CALLBACK IEnumSTATPROPSETSTG_Skip_Proxy(
8791     IEnumSTATPROPSETSTG* This,
8792     ULONG celt);
8793 void __RPC_STUB IEnumSTATPROPSETSTG_Skip_Stub(
8794     struct IRpcStubBuffer* This,
8795     struct IRpcChannelBuffer* pRpcChannelBuffer,
8796     PRPC_MESSAGE pRpcMessage,
8797     DWORD* pdwStubPhase);
8798 HRESULT CALLBACK IEnumSTATPROPSETSTG_Reset_Proxy(
8799     IEnumSTATPROPSETSTG* This);
8800 void __RPC_STUB IEnumSTATPROPSETSTG_Reset_Stub(
8801     struct IRpcStubBuffer* This,
8802     struct IRpcChannelBuffer* pRpcChannelBuffer,
8803     PRPC_MESSAGE pRpcMessage,
8804     DWORD* pdwStubPhase);
8805 HRESULT CALLBACK IEnumSTATPROPSETSTG_Clone_Proxy(
8806     IEnumSTATPROPSETSTG* This,
8807     IEnumSTATPROPSETSTG** ppenum);
8808 void __RPC_STUB IEnumSTATPROPSETSTG_Clone_Stub(
8809     struct IRpcStubBuffer* This,
8810     struct IRpcChannelBuffer* pRpcChannelBuffer,
8811     PRPC_MESSAGE pRpcMessage,
8812     DWORD* pdwStubPhase);
8813
8814 typedef struct IClientSecurity IClientSecurity;
8815 typedef struct tagSOLE_AUTHENTICATION_SERVICE {
8816     DWORD dwAuthnSvc;
8817     DWORD dwAuthzSvc;
8818     OLECHAR *pPrincipalName;
8819     HRESULT hr;
8820 } SOLE_AUTHENTICATION_SERVICE;
8821
8822 typedef SOLE_AUTHENTICATION_SERVICE *PSOLE_AUTHENTICATION_SERVICE;
8823
8824 typedef enum tagEOLE_AUTHENTICATION_CAPABILITIES {
8825     EOAC_NONE = 0x0,
8826     EOAC_MUTUAL_AUTH = 0x1,
8827     EOAC_CLOAKING = 0x10,
8828     EOAC_SECURE_REFS = 0x2,
8829     EOAC_ACCESS_CONTROL = 0x4,
8830     EOAC_APPID = 0x8
8831 } EOLE_AUTHENTICATION_CAPABILITIES;
8832
8833 /*****************************************************************************
8834  * IClientSecurity interface
8835  */
8836 DEFINE_GUID(IID_IClientSecurity, 0x0000013d, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
8837 #if defined(__cplusplus) && !defined(CINTERFACE)
8838 struct IClientSecurity : public IUnknown
8839 {
8840     virtual HRESULT STDMETHODCALLTYPE QueryBlanket(
8841         IUnknown* pProxy,
8842         DWORD* pAuthnSvc,
8843         DWORD* pAuthzSvc,
8844         OLECHAR** pServerPrincName,
8845         DWORD* pAuthnLevel,
8846         DWORD* pImpLevel,
8847         void** pAuthInfo,
8848         DWORD* pCapabilites) = 0;
8849
8850     virtual HRESULT STDMETHODCALLTYPE SetBlanket(
8851         IUnknown* pProxy,
8852         DWORD AuthnSvc,
8853         DWORD AuthzSvc,
8854         OLECHAR* pServerPrincName,
8855         DWORD AuthnLevel,
8856         DWORD ImpLevel,
8857         void* pAuthInfo,
8858         DWORD Capabilities) = 0;
8859
8860     virtual HRESULT STDMETHODCALLTYPE CopyProxy(
8861         IUnknown* pProxy,
8862         IUnknown** ppCopy) = 0;
8863
8864 };
8865 #else
8866 typedef struct IClientSecurityVtbl IClientSecurityVtbl;
8867 struct IClientSecurity {
8868     const IClientSecurityVtbl* lpVtbl;
8869 };
8870 struct IClientSecurityVtbl {
8871     ICOM_MSVTABLE_COMPAT_FIELDS
8872
8873     /*** IUnknown methods ***/
8874     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
8875         IClientSecurity* This,
8876         REFIID riid,
8877         void** ppvObject);
8878
8879     ULONG (STDMETHODCALLTYPE *AddRef)(
8880         IClientSecurity* This);
8881
8882     ULONG (STDMETHODCALLTYPE *Release)(
8883         IClientSecurity* This);
8884
8885     /*** IClientSecurity methods ***/
8886     HRESULT (STDMETHODCALLTYPE *QueryBlanket)(
8887         IClientSecurity* This,
8888         IUnknown* pProxy,
8889         DWORD* pAuthnSvc,
8890         DWORD* pAuthzSvc,
8891         OLECHAR** pServerPrincName,
8892         DWORD* pAuthnLevel,
8893         DWORD* pImpLevel,
8894         void** pAuthInfo,
8895         DWORD* pCapabilites);
8896
8897     HRESULT (STDMETHODCALLTYPE *SetBlanket)(
8898         IClientSecurity* This,
8899         IUnknown* pProxy,
8900         DWORD AuthnSvc,
8901         DWORD AuthzSvc,
8902         OLECHAR* pServerPrincName,
8903         DWORD AuthnLevel,
8904         DWORD ImpLevel,
8905         void* pAuthInfo,
8906         DWORD Capabilities);
8907
8908     HRESULT (STDMETHODCALLTYPE *CopyProxy)(
8909         IClientSecurity* This,
8910         IUnknown* pProxy,
8911         IUnknown** ppCopy);
8912
8913 };
8914
8915 /*** IUnknown methods ***/
8916 #define IClientSecurity_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
8917 #define IClientSecurity_AddRef(p) (p)->lpVtbl->AddRef(p)
8918 #define IClientSecurity_Release(p) (p)->lpVtbl->Release(p)
8919 /*** IClientSecurity methods ***/
8920 #define IClientSecurity_QueryBlanket(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->QueryBlanket(p,a,b,c,d,e,f,g,h)
8921 #define IClientSecurity_SetBlanket(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->SetBlanket(p,a,b,c,d,e,f,g,h)
8922 #define IClientSecurity_CopyProxy(p,a,b) (p)->lpVtbl->CopyProxy(p,a,b)
8923
8924 #endif
8925
8926 #define IClientSecurity_METHODS \
8927     ICOM_MSVTABLE_COMPAT_FIELDS \
8928     /*** IUnknown methods ***/ \
8929     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
8930     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
8931     STDMETHOD_(ULONG,Release)(THIS) PURE; \
8932     /*** IClientSecurity methods ***/ \
8933     STDMETHOD_(HRESULT,QueryBlanket)(THIS_ IUnknown* pProxy, DWORD* pAuthnSvc, DWORD* pAuthzSvc, OLECHAR** pServerPrincName, DWORD* pAuthnLevel, DWORD* pImpLevel, void** pAuthInfo, DWORD* pCapabilites) PURE; \
8934     STDMETHOD_(HRESULT,SetBlanket)(THIS_ IUnknown* pProxy, DWORD AuthnSvc, DWORD AuthzSvc, OLECHAR* pServerPrincName, DWORD AuthnLevel, DWORD ImpLevel, void* pAuthInfo, DWORD Capabilities) PURE; \
8935     STDMETHOD_(HRESULT,CopyProxy)(THIS_ IUnknown* pProxy, IUnknown** ppCopy) PURE;
8936
8937 HRESULT CALLBACK IClientSecurity_QueryBlanket_Proxy(
8938     IClientSecurity* This,
8939     IUnknown* pProxy,
8940     DWORD* pAuthnSvc,
8941     DWORD* pAuthzSvc,
8942     OLECHAR** pServerPrincName,
8943     DWORD* pAuthnLevel,
8944     DWORD* pImpLevel,
8945     void** pAuthInfo,
8946     DWORD* pCapabilites);
8947 void __RPC_STUB IClientSecurity_QueryBlanket_Stub(
8948     struct IRpcStubBuffer* This,
8949     struct IRpcChannelBuffer* pRpcChannelBuffer,
8950     PRPC_MESSAGE pRpcMessage,
8951     DWORD* pdwStubPhase);
8952 HRESULT CALLBACK IClientSecurity_SetBlanket_Proxy(
8953     IClientSecurity* This,
8954     IUnknown* pProxy,
8955     DWORD AuthnSvc,
8956     DWORD AuthzSvc,
8957     OLECHAR* pServerPrincName,
8958     DWORD AuthnLevel,
8959     DWORD ImpLevel,
8960     void* pAuthInfo,
8961     DWORD Capabilities);
8962 void __RPC_STUB IClientSecurity_SetBlanket_Stub(
8963     struct IRpcStubBuffer* This,
8964     struct IRpcChannelBuffer* pRpcChannelBuffer,
8965     PRPC_MESSAGE pRpcMessage,
8966     DWORD* pdwStubPhase);
8967 HRESULT CALLBACK IClientSecurity_CopyProxy_Proxy(
8968     IClientSecurity* This,
8969     IUnknown* pProxy,
8970     IUnknown** ppCopy);
8971 void __RPC_STUB IClientSecurity_CopyProxy_Stub(
8972     struct IRpcStubBuffer* This,
8973     struct IRpcChannelBuffer* pRpcChannelBuffer,
8974     PRPC_MESSAGE pRpcMessage,
8975     DWORD* pdwStubPhase);
8976
8977 typedef struct IServerSecurity IServerSecurity;
8978 /*****************************************************************************
8979  * IServerSecurity interface
8980  */
8981 DEFINE_GUID(IID_IServerSecurity, 0x0000013e, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
8982 #if defined(__cplusplus) && !defined(CINTERFACE)
8983 struct IServerSecurity : public IUnknown
8984 {
8985     virtual HRESULT STDMETHODCALLTYPE QueryBlanket(
8986         DWORD* pAuthnSvc,
8987         DWORD* pAuthzSvc,
8988         OLECHAR** pServerPrincName,
8989         DWORD* pAuthnLevel,
8990         DWORD* pImpLevel,
8991         void** pPrivs,
8992         DWORD* pCapabilities) = 0;
8993
8994     virtual HRESULT STDMETHODCALLTYPE ImpersonateClient(
8995         ) = 0;
8996
8997     virtual HRESULT STDMETHODCALLTYPE RevertToSelf(
8998         ) = 0;
8999
9000     virtual BOOL STDMETHODCALLTYPE IsImpersonating(
9001         ) = 0;
9002
9003 };
9004 #else
9005 typedef struct IServerSecurityVtbl IServerSecurityVtbl;
9006 struct IServerSecurity {
9007     const IServerSecurityVtbl* lpVtbl;
9008 };
9009 struct IServerSecurityVtbl {
9010     ICOM_MSVTABLE_COMPAT_FIELDS
9011
9012     /*** IUnknown methods ***/
9013     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
9014         IServerSecurity* This,
9015         REFIID riid,
9016         void** ppvObject);
9017
9018     ULONG (STDMETHODCALLTYPE *AddRef)(
9019         IServerSecurity* This);
9020
9021     ULONG (STDMETHODCALLTYPE *Release)(
9022         IServerSecurity* This);
9023
9024     /*** IServerSecurity methods ***/
9025     HRESULT (STDMETHODCALLTYPE *QueryBlanket)(
9026         IServerSecurity* This,
9027         DWORD* pAuthnSvc,
9028         DWORD* pAuthzSvc,
9029         OLECHAR** pServerPrincName,
9030         DWORD* pAuthnLevel,
9031         DWORD* pImpLevel,
9032         void** pPrivs,
9033         DWORD* pCapabilities);
9034
9035     HRESULT (STDMETHODCALLTYPE *ImpersonateClient)(
9036         IServerSecurity* This);
9037
9038     HRESULT (STDMETHODCALLTYPE *RevertToSelf)(
9039         IServerSecurity* This);
9040
9041     BOOL (STDMETHODCALLTYPE *IsImpersonating)(
9042         IServerSecurity* This);
9043
9044 };
9045
9046 /*** IUnknown methods ***/
9047 #define IServerSecurity_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
9048 #define IServerSecurity_AddRef(p) (p)->lpVtbl->AddRef(p)
9049 #define IServerSecurity_Release(p) (p)->lpVtbl->Release(p)
9050 /*** IServerSecurity methods ***/
9051 #define IServerSecurity_QueryBlanket(p,a,b,c,d,e,f,g) (p)->lpVtbl->QueryBlanket(p,a,b,c,d,e,f,g)
9052 #define IServerSecurity_ImpersonateClient(p) (p)->lpVtbl->ImpersonateClient(p)
9053 #define IServerSecurity_RevertToSelf(p) (p)->lpVtbl->RevertToSelf(p)
9054 #define IServerSecurity_IsImpersonating(p) (p)->lpVtbl->IsImpersonating(p)
9055
9056 #endif
9057
9058 #define IServerSecurity_METHODS \
9059     ICOM_MSVTABLE_COMPAT_FIELDS \
9060     /*** IUnknown methods ***/ \
9061     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
9062     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
9063     STDMETHOD_(ULONG,Release)(THIS) PURE; \
9064     /*** IServerSecurity methods ***/ \
9065     STDMETHOD_(HRESULT,QueryBlanket)(THIS_ DWORD* pAuthnSvc, DWORD* pAuthzSvc, OLECHAR** pServerPrincName, DWORD* pAuthnLevel, DWORD* pImpLevel, void** pPrivs, DWORD* pCapabilities) PURE; \
9066     STDMETHOD_(HRESULT,ImpersonateClient)(THIS) PURE; \
9067     STDMETHOD_(HRESULT,RevertToSelf)(THIS) PURE; \
9068     STDMETHOD_(BOOL,IsImpersonating)(THIS) PURE;
9069
9070 HRESULT CALLBACK IServerSecurity_QueryBlanket_Proxy(
9071     IServerSecurity* This,
9072     DWORD* pAuthnSvc,
9073     DWORD* pAuthzSvc,
9074     OLECHAR** pServerPrincName,
9075     DWORD* pAuthnLevel,
9076     DWORD* pImpLevel,
9077     void** pPrivs,
9078     DWORD* pCapabilities);
9079 void __RPC_STUB IServerSecurity_QueryBlanket_Stub(
9080     struct IRpcStubBuffer* This,
9081     struct IRpcChannelBuffer* pRpcChannelBuffer,
9082     PRPC_MESSAGE pRpcMessage,
9083     DWORD* pdwStubPhase);
9084 HRESULT CALLBACK IServerSecurity_ImpersonateClient_Proxy(
9085     IServerSecurity* This);
9086 void __RPC_STUB IServerSecurity_ImpersonateClient_Stub(
9087     struct IRpcStubBuffer* This,
9088     struct IRpcChannelBuffer* pRpcChannelBuffer,
9089     PRPC_MESSAGE pRpcMessage,
9090     DWORD* pdwStubPhase);
9091 HRESULT CALLBACK IServerSecurity_RevertToSelf_Proxy(
9092     IServerSecurity* This);
9093 void __RPC_STUB IServerSecurity_RevertToSelf_Stub(
9094     struct IRpcStubBuffer* This,
9095     struct IRpcChannelBuffer* pRpcChannelBuffer,
9096     PRPC_MESSAGE pRpcMessage,
9097     DWORD* pdwStubPhase);
9098 BOOL CALLBACK IServerSecurity_IsImpersonating_Proxy(
9099     IServerSecurity* This);
9100 void __RPC_STUB IServerSecurity_IsImpersonating_Stub(
9101     struct IRpcStubBuffer* This,
9102     struct IRpcChannelBuffer* pRpcChannelBuffer,
9103     PRPC_MESSAGE pRpcMessage,
9104     DWORD* pdwStubPhase);
9105
9106 typedef struct IAsyncSetup IAsyncSetup;
9107 /*****************************************************************************
9108  * IAsyncSetup interface
9109  */
9110 DEFINE_GUID(IID_IAsyncSetup, 0x00000024, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
9111 #if defined(__cplusplus) && !defined(CINTERFACE)
9112 struct IAsyncSetup : public IUnknown
9113 {
9114     virtual HRESULT STDMETHODCALLTYPE GetAsyncManager(
9115         REFIID riid,
9116         IUnknown* pOuter,
9117         DWORD dwFlags,
9118         IUnknown** ppInner,
9119         IAsyncManager** ppAsyncMgr) = 0;
9120
9121 };
9122 #else
9123 typedef struct IAsyncSetupVtbl IAsyncSetupVtbl;
9124 struct IAsyncSetup {
9125     const IAsyncSetupVtbl* lpVtbl;
9126 };
9127 struct IAsyncSetupVtbl {
9128     ICOM_MSVTABLE_COMPAT_FIELDS
9129
9130     /*** IUnknown methods ***/
9131     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
9132         IAsyncSetup* This,
9133         REFIID riid,
9134         void** ppvObject);
9135
9136     ULONG (STDMETHODCALLTYPE *AddRef)(
9137         IAsyncSetup* This);
9138
9139     ULONG (STDMETHODCALLTYPE *Release)(
9140         IAsyncSetup* This);
9141
9142     /*** IAsyncSetup methods ***/
9143     HRESULT (STDMETHODCALLTYPE *GetAsyncManager)(
9144         IAsyncSetup* This,
9145         REFIID riid,
9146         IUnknown* pOuter,
9147         DWORD dwFlags,
9148         IUnknown** ppInner,
9149         IAsyncManager** ppAsyncMgr);
9150
9151 };
9152
9153 /*** IUnknown methods ***/
9154 #define IAsyncSetup_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
9155 #define IAsyncSetup_AddRef(p) (p)->lpVtbl->AddRef(p)
9156 #define IAsyncSetup_Release(p) (p)->lpVtbl->Release(p)
9157 /*** IAsyncSetup methods ***/
9158 #define IAsyncSetup_GetAsyncManager(p,a,b,c,d,e) (p)->lpVtbl->GetAsyncManager(p,a,b,c,d,e)
9159
9160 #endif
9161
9162 #define IAsyncSetup_METHODS \
9163     ICOM_MSVTABLE_COMPAT_FIELDS \
9164     /*** IUnknown methods ***/ \
9165     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
9166     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
9167     STDMETHOD_(ULONG,Release)(THIS) PURE; \
9168     /*** IAsyncSetup methods ***/ \
9169     STDMETHOD_(HRESULT,GetAsyncManager)(THIS_ REFIID riid, IUnknown* pOuter, DWORD dwFlags, IUnknown** ppInner, IAsyncManager** ppAsyncMgr) PURE;
9170
9171 HRESULT CALLBACK IAsyncSetup_GetAsyncManager_Proxy(
9172     IAsyncSetup* This,
9173     REFIID riid,
9174     IUnknown* pOuter,
9175     DWORD dwFlags,
9176     IUnknown** ppInner,
9177     IAsyncManager** ppAsyncMgr);
9178 void __RPC_STUB IAsyncSetup_GetAsyncManager_Stub(
9179     struct IRpcStubBuffer* This,
9180     struct IRpcChannelBuffer* pRpcChannelBuffer,
9181     PRPC_MESSAGE pRpcMessage,
9182     DWORD* pdwStubPhase);
9183
9184 typedef enum tagDCOM_CALL_STATE {
9185     DCOM_NONE = 0,
9186     DCOM_CALL_COMPLETE = 1,
9187     DCOM_CALL_CANCELED = 2
9188 } DCOM_CALL_STATE;
9189
9190 /*****************************************************************************
9191  * IAsyncManager interface
9192  */
9193 DEFINE_GUID(IID_IAsyncManager, 0x0000002a, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
9194 #if defined(__cplusplus) && !defined(CINTERFACE)
9195 struct IAsyncManager : public IUnknown
9196 {
9197     virtual HRESULT STDMETHODCALLTYPE CompleteCall(
9198         HRESULT Result) = 0;
9199
9200     virtual HRESULT STDMETHODCALLTYPE GetCallContext(
9201         REFIID riid,
9202         void** pInterface) = 0;
9203
9204     virtual HRESULT STDMETHODCALLTYPE GetState(
9205         ULONG* pulStateFlags) = 0;
9206
9207 };
9208 #else
9209 typedef struct IAsyncManagerVtbl IAsyncManagerVtbl;
9210 struct IAsyncManager {
9211     const IAsyncManagerVtbl* lpVtbl;
9212 };
9213 struct IAsyncManagerVtbl {
9214     ICOM_MSVTABLE_COMPAT_FIELDS
9215
9216     /*** IUnknown methods ***/
9217     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
9218         IAsyncManager* This,
9219         REFIID riid,
9220         void** ppvObject);
9221
9222     ULONG (STDMETHODCALLTYPE *AddRef)(
9223         IAsyncManager* This);
9224
9225     ULONG (STDMETHODCALLTYPE *Release)(
9226         IAsyncManager* This);
9227
9228     /*** IAsyncManager methods ***/
9229     HRESULT (STDMETHODCALLTYPE *CompleteCall)(
9230         IAsyncManager* This,
9231         HRESULT Result);
9232
9233     HRESULT (STDMETHODCALLTYPE *GetCallContext)(
9234         IAsyncManager* This,
9235         REFIID riid,
9236         void** pInterface);
9237
9238     HRESULT (STDMETHODCALLTYPE *GetState)(
9239         IAsyncManager* This,
9240         ULONG* pulStateFlags);
9241
9242 };
9243
9244 /*** IUnknown methods ***/
9245 #define IAsyncManager_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
9246 #define IAsyncManager_AddRef(p) (p)->lpVtbl->AddRef(p)
9247 #define IAsyncManager_Release(p) (p)->lpVtbl->Release(p)
9248 /*** IAsyncManager methods ***/
9249 #define IAsyncManager_CompleteCall(p,a) (p)->lpVtbl->CompleteCall(p,a)
9250 #define IAsyncManager_GetCallContext(p,a,b) (p)->lpVtbl->GetCallContext(p,a,b)
9251 #define IAsyncManager_GetState(p,a) (p)->lpVtbl->GetState(p,a)
9252
9253 #endif
9254
9255 #define IAsyncManager_METHODS \
9256     ICOM_MSVTABLE_COMPAT_FIELDS \
9257     /*** IUnknown methods ***/ \
9258     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
9259     STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
9260     STDMETHOD_(ULONG,Release)(THIS) PURE; \
9261     /*** IAsyncManager methods ***/ \
9262     STDMETHOD_(HRESULT,CompleteCall)(THIS_ HRESULT Result) PURE; \
9263     STDMETHOD_(HRESULT,GetCallContext)(THIS_ REFIID riid, void** pInterface) PURE; \
9264     STDMETHOD_(HRESULT,GetState)(THIS_ ULONG* pulStateFlags) PURE;
9265
9266 HRESULT CALLBACK IAsyncManager_CompleteCall_Proxy(
9267     IAsyncManager* This,
9268     HRESULT Result);
9269 void __RPC_STUB IAsyncManager_CompleteCall_Stub(
9270     struct IRpcStubBuffer* This,
9271     struct IRpcChannelBuffer* pRpcChannelBuffer,
9272     PRPC_MESSAGE pRpcMessage,
9273     DWORD* pdwStubPhase);
9274 HRESULT CALLBACK IAsyncManager_GetCallContext_Proxy(
9275     IAsyncManager* This,
9276     REFIID riid,
9277     void** pInterface);
9278 void __RPC_STUB IAsyncManager_GetCallContext_Stub(
9279     struct IRpcStubBuffer* This,
9280     struct IRpcChannelBuffer* pRpcChannelBuffer,
9281     PRPC_MESSAGE pRpcMessage,
9282     DWORD* pdwStubPhase);
9283 HRESULT CALLBACK IAsyncManager_GetState_Proxy(
9284     IAsyncManager* This,
9285     ULONG* pulStateFlags);
9286 void __RPC_STUB IAsyncManager_GetState_Stub(
9287     struct IRpcStubBuffer* This,
9288     struct IRpcChannelBuffer* pRpcChannelBuffer,
9289     PRPC_MESSAGE pRpcMessage,
9290     DWORD* pdwStubPhase);
9291
9292 #ifdef __cplusplus
9293 }
9294 #endif
9295 #endif /* __WIDL_OBJIDL_H */