Added missing __volatile__.
[wine] / include / wine / obj_marshal.h
1 /*
2  * Defines the COM interfaces and APIs that allow an interface to 
3  * specify a custom marshaling for its objects.
4  */
5
6 #ifndef __WINE_WINE_OBJ_MARSHAL_H
7 #define __WINE_WINE_OBJ_MARSHAL_H
8
9 #include "wine/obj_base.h"
10 #include "wine/obj_storage.h"
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif /* defined(__cplusplus) */
15
16 /*****************************************************************************
17  * Predeclare the interfaces
18  */
19 DEFINE_OLEGUID(IID_IMarshal,            0x00000003L, 0, 0);
20 typedef struct IMarshal IMarshal,*LPMARSHAL;
21
22 DEFINE_OLEGUID(IID_IStdMarshalInfo,     0x00000018L, 0, 0);
23 typedef struct IStdMarshalInfo IStdMarshalInfo,*LPSTDMARSHALINFO;
24
25
26 /*****************************************************************************
27  * IMarshal interface
28  */
29 #define ICOM_INTERFACE IMarshal
30 #define IMarshal_METHODS \
31     ICOM_METHOD6(HRESULT,GetUnmarshalClass,  REFIID,riid, void*,pv, DWORD,dwDestContext, void*,pvDestContext, DWORD,mshlflags, CLSID*,pCid) \
32     ICOM_METHOD6(HRESULT,GetMarshalSizeMax,  REFIID,riid, void*,pv, DWORD,dwDestContext, void*,pvDestContext, DWORD,mshlflags, DWORD*,pSize) \
33     ICOM_METHOD6(HRESULT,MarshalInterface,   IStream*,pStm, REFIID,riid, void*,pv, DWORD,dwDestContext, void*,pvDestContext, DWORD,mshlflags) \
34     ICOM_METHOD3(HRESULT,UnmarshalInterface, IStream*,pStm, REFIID,riid, void**,ppv) \
35     ICOM_METHOD1(HRESULT,ReleaseMarshalData, IStream*,pStm) \
36     ICOM_METHOD1(HRESULT,DisconnectObject,   DWORD,dwReserved)
37 #define IMarshal_IMETHODS \
38     IUnknown_IMETHODS \
39     IMarshal_METHODS
40 ICOM_DEFINE(IMarshal,IUnknown)
41 #undef ICOM_INTERFACE
42
43 /*** IUnknown methods ***/
44 #define IMarshal_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
45 #define IMarshal_AddRef(p)             ICOM_CALL (AddRef,p)
46 #define IMarshal_Release(p)            ICOM_CALL (Release,p)
47 /*** IMarshal methods ***/
48 #define IMarshal_GetUnmarshalClass(p,a,b,c,d,e,f) ICOM_CALL6(GetUnmarshalClass,p,a,b,c,d,e,f)
49 #define IMarshal_GetMarshalSizeMax(p,a,b,c,d,e,f) ICOM_CALL6(GetMarshalSizeMax,p,a,b,c,d,e,f)
50 #define IMarshal_MarshalInterface(p,a,b,c,d,e,f)  ICOM_CALL6(MarshalInterface,p,a,b,c,d,e,f)
51 #define IMarshal_UnmarshalInterface(p,a,b,c)      ICOM_CALL3(UnmarshalInterface,p,a,b,c)
52 #define IMarshal_ReleaseMarshalData(p,a)          ICOM_CALL1(ReleaseMarshalData,p,a)
53 #define IMarshal_DisconnectObject(p,a)            ICOM_CALL1(DisconnectObject,p,a)
54
55
56 /*****************************************************************************
57  * IStdMarshalInfo interface
58  */
59 #define ICOM_INTERFACE IStdMarshalInfo
60 #define IStdMarshalInfo_METHODS \
61     ICOM_METHOD3(HRESULT,GetClassForHandler,  DWORD,dwDestContext, void*,pvDestContext, CLSID*,pClsid)
62 #define IStdMarshalInfo_IMETHODS \
63     IUnknown_IMETHODS \
64     IStdMarshalInfo_METHODS
65 ICOM_DEFINE(IStdMarshalInfo,IUnknown)
66 #undef ICOM_INTERFACE
67
68 /*** IUnknown methods ***/
69 #define IStdMarshalInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
70 #define IStdMarshalInfo_AddRef(p)             ICOM_CALL (AddRef,p)
71 #define IStdMarshalInfo_Release(p)            ICOM_CALL (Release,p)
72 /*** IStdMarshalInfo methods ***/
73 #define IStdMarshalInfo_GetClassForHandler(p,a,b,c) ICOM_CALL3(GetClassForHandler,p,a,b,c)
74
75
76 /*****************************************************************************
77  * Additional marshalling API
78  */
79
80 /* FIXME: not implemented */
81 HRESULT WINAPI CoCreateFreeThreadedMarshaler(LPUNKNOWN punkOuter, LPUNKNOWN* ppunkMarshal);
82
83 /* FIXME: not implemented */
84 HRESULT WINAPI CoGetInterfaceAndReleaseStream(LPSTREAM pStm, REFIID iid, LPVOID* ppv);
85
86 /* FIXME: not implemented */
87 HRESULT WINAPI CoGetMarshalSizeMax(ULONG* pulSize, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags);
88
89 /* FIXME: not implemented */
90 HRESULT WINAPI CoGetStandardMarshal(REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, LPMARSHAL* ppMarshal);
91
92 /* FIXME: not implemented */
93 HRESULT WINAPI CoMarshalHresult(LPSTREAM pstm, HRESULT hresult);
94
95 /* FIXME: not implemented */
96 HRESULT WINAPI CoMarshalInterface(LPSTREAM pStm, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags);
97
98 /* FIXME: not implemented */
99 HRESULT WINAPI CoMarshalInterThreadInterfaceInStream(REFIID riid, LPUNKNOWN pUnk, LPSTREAM* ppStm);
100
101 /* FIXME: not implemented */
102 HRESULT WINAPI CoReleaseMarshalData(LPSTREAM pStm);
103
104 /* FIXME: not implemented */
105 HRESULT WINAPI CoUnmarshalHresult(LPSTREAM pstm, HRESULT* phresult);
106
107 /* FIXME: not implemented */
108 HRESULT WINAPI CoUnmarshalInterface(LPSTREAM pStm, REFIID riid, LPVOID* ppv);
109
110 #ifdef __cplusplus
111 } /* extern "C" */
112 #endif /* defined(__cplusplus) */
113
114 #endif /* __WINE_WINE_OBJ_MARSHAL_H */