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