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