2 * Defines the COM interfaces and APIs that allow an interface to
3 * specify a custom marshaling for its objects.
6 #ifndef __WINE_WINE_OBJ_MARSHAL_H
7 #define __WINE_WINE_OBJ_MARSHAL_H
11 #endif /* defined(__cplusplus) */
13 /*****************************************************************************
14 * Predeclare the interfaces
16 DEFINE_OLEGUID(IID_IMarshal
, 0x00000003L
, 0, 0);
17 typedef struct IMarshal IMarshal
,*LPMARSHAL
;
19 DEFINE_OLEGUID(IID_IStdMarshalInfo
, 0x00000018L
, 0, 0);
20 typedef struct IStdMarshalInfo IStdMarshalInfo
,*LPSTDMARSHALINFO
;
23 /*****************************************************************************
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 \
37 ICOM_DEFINE(IMarshal
,IUnknown
)
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)
53 /*****************************************************************************
54 * IStdMarshalInfo interface
56 #define ICOM_INTERFACE IStdMarshalInfo
57 #define IStdMarshalInfo_METHODS \
58 ICOM_METHOD3(HRESULT,GetClassForHandler, DWORD,dwDestContext, void*,pvDestContext, CLSID*,pClsid)
59 #define IStdMarshalInfo_IMETHODS \
61 IStdMarshalInfo_METHODS
62 ICOM_DEFINE(IStdMarshalInfo
,IUnknown
)
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)
73 /*****************************************************************************
74 * Additional marshalling API
77 /* FIXME: not implemented */
78 HRESULT WINAPI
CoCreateFreeThreadedMarshaler(LPUNKNOWN punkOuter
, LPUNKNOWN
* ppunkMarshal
);
80 /* FIXME: not implemented */
81 HRESULT WINAPI
CoGetInterfaceAndReleaseStream(LPSTREAM pStm
, REFIID iid
, LPVOID
* ppv
);
83 /* FIXME: not implemented */
84 HRESULT WINAPI
CoGetMarshalSizeMax(ULONG
* pulSize
, REFIID riid
, LPUNKNOWN pUnk
, DWORD dwDestContext
, LPVOID pvDestContext
, DWORD mshlflags
);
86 /* FIXME: not implemented */
87 HRESULT WINAPI
CoGetStandardMarshal(REFIID riid
, LPUNKNOWN pUnk
, DWORD dwDestContext
, LPVOID pvDestContext
, DWORD mshlflags
, LPMARSHAL
* ppMarshal
);
89 /* FIXME: not implemented */
90 HRESULT WINAPI
CoMarshalHresult(LPSTREAM pstm
, HRESULT hresult
);
92 /* FIXME: not implemented */
93 HRESULT WINAPI
CoMarshalInterface(LPSTREAM pStm
, REFIID riid
, LPUNKNOWN pUnk
, DWORD dwDestContext
, LPVOID pvDestContext
, DWORD mshlflags
);
95 /* FIXME: not implemented */
96 HRESULT WINAPI
CoMarshalInterThreadInterfaceInStream(REFIID riid
, LPUNKNOWN pUnk
, LPSTREAM
* ppStm
);
98 /* FIXME: not implemented */
99 HRESULT WINAPI
CoReleaseMarshalData(LPSTREAM pStm
);
101 /* FIXME: not implemented */
102 HRESULT WINAPI
CoUnmarshalHresult(LPSTREAM pstm
, HRESULT
* phresult
);
104 /* FIXME: not implemented */
105 HRESULT WINAPI
CoUnmarshalInterface(LPSTREAM pStm
, REFIID riid
, LPVOID
* ppv
);
109 #endif /* defined(__cplusplus) */
111 #endif /* __WINE_WINE_OBJ_MARSHAL_H */