The first 2 parameters of WinMain are HINSTANCEs, not HANDLEs.
[wine] / include / wine / obj_channel.h
1 /*
2  * Defines undocumented Microsoft COM interfaces and APIs seemingly related to some 'channel' notion.
3  */
4
5 #ifndef __WINE_WINE_OBJ_CHANNEL_H
6 #define __WINE_WINE_OBJ_CHANNEL_H
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif /* defined(__cplusplus) */
11
12 /*****************************************************************************
13  * Predeclare the interfaces
14  */
15 DEFINE_GUID   (IID_IChannelHook,        0x1008c4a0L, 0x7613, 0x11cf, 0x9a, 0xf1, 0x00, 0x20, 0xaf, 0x6e, 0x72, 0xf4);
16 typedef struct IChannelHook IChannelHook,*LPCHANNELHOOK;
17
18 DEFINE_GUID   (IID_IPSFactoryBuffer,    0xd5f569d0L, 0x593b, 0x101a, 0xb5, 0x69, 0x08, 0x00, 0x2b, 0x2d, 0xbf, 0x7a);
19 typedef struct IPSFactoryBuffer IPSFactoryBuffer,*LPPSFACTORYBUFFER;
20
21 DEFINE_GUID   (IID_IRpcChannelBuffer,   0xd5f56b60L, 0x593b, 0x101a, 0xb5, 0x69, 0x08, 0x00, 0x2b, 0x2d, 0xbf, 0x7a);
22 typedef struct IRpcChannelBuffer IRpcChannelBuffer,*LPRPCCHANNELBUFFER;
23
24 DEFINE_GUID   (IID_IRpcProxyBuffer,     0xd5f56a34L, 0x593b, 0x101a, 0xb5, 0x69, 0x08, 0x00, 0x2b, 0x2d, 0xbf, 0x7a);
25 typedef struct IRpcProxyBuffer IRpcProxyBuffer,*LPRPCPROXYBUFFER;
26
27 DEFINE_GUID   (IID_IRpcStubBuffer,      0xd5f56afcL, 0x593b, 0x101a, 0xb5, 0x69, 0x08, 0x00, 0x2b, 0x2d, 0xbf, 0x7a);
28 typedef struct IRpcStubBuffer IRpcStubBuffer,*LPRPCSTUBBUFFER;
29
30
31 /*****************************************************************************
32  * IChannelHook interface
33  */
34 #define ICOM_INTERFACE IChannelHook
35 #define IChannelHook_METHODS \
36     ICOM_VMETHOD3(ClientGetSize,    REFGUID,uExtent, REFIID,riid, ULONG*,pDataSize) \
37     ICOM_VMETHOD4(ClientFillBuffer, REFGUID,uExtent, REFIID,riid, ULONG*,pDataSize, void*,pDataBuffer) \
38     ICOM_VMETHOD6(ClientNotify,     REFGUID,uExtent, REFIID,riid, ULONG,cbDataSize, void*,pDataBuffer, DWORD,lDataRep, HRESULT,hrFault) \
39     ICOM_VMETHOD5(ServerNotify,     REFGUID,uExtent, REFIID,riid, ULONG,cbDataSize, void*,pDataBuffer, DWORD,lDataRep) \
40     ICOM_VMETHOD4(ServerGetSize,    REFGUID,uExtent, REFIID,riid, HRESULT,hrFault, ULONG*,pDataSize) \
41     ICOM_VMETHOD5(ServerFillBuffer, REFGUID,uExtent, REFIID,riid, ULONG*,pDataSize, void*,pDataBuffer, HRESULT,hrFault)
42 #define IChannelHook_IMETHODS \
43     IUnknown_IMETHODS \
44     IChannelHook_METHODS
45 ICOM_DEFINE(IChannelHook,IUnknown)
46 #undef ICOM_INTERFACE
47
48 /*** IUnknown methods ***/
49 #define IChannelHook_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
50 #define IChannelHook_AddRef(p)             ICOM_CALL (AddRef,p)
51 #define IChannelHook_Release(p)            ICOM_CALL (Release,p)
52 /*** IChannelHook methods ***/
53 #define IChannelHook_ClientGetSize(p,a,b,c)        ICOM_CALL(ClientGetSize,p,a,b,c)
54 #define IChannelHook_ClientFillBuffer(p,a,b,c,d)   ICOM_CALL(ClientFillBuffer,p,a,b,c,d)
55 #define IChannelHook_ClientNotify(p,a,b,c,d,e,f)   ICOM_CALL(ClientNotify,p,a,b,c,d,e,f)
56 #define IChannelHook_ServerNotify(p,a,b,c,d,e)     ICOM_CALL(ServerNotify,p,a,b,c,d,e)
57 #define IChannelHook_ServerGetSize(p,a,b,c,d)      ICOM_CALL(ServerGetSize,p,a,b,c,d)
58 #define IChannelHook_ServerFillBuffer(p,a,b,c,d,e) ICOM_CALL(ServerFillBuffer,p,a,b,c,d,e)
59
60
61 /*****************************************************************************
62  * IPSFactoryBuffer interface
63  */
64 #define ICOM_INTERFACE IPSFactoryBuffer
65 #define IPSFactoryBuffer_METHODS \
66     ICOM_METHOD4(HRESULT,CreateProxy, IUnknown*,pUnkOuter, REFIID,riid, IRpcProxyBuffer**,ppProxy, void**,ppv) \
67     ICOM_METHOD3(HRESULT,CreateStub,  REFIID,riid, IUnknown*,pUnkServer, IRpcStubBuffer**,ppStub)
68 #define IPSFactoryBuffer_IMETHODS \
69     IUnknown_IMETHODS \
70     IPSFactoryBuffer_METHODS
71 ICOM_DEFINE(IPSFactoryBuffer,IUnknown)
72 #undef ICOM_INTERFACE
73
74 /*** IUnknown methods ***/
75 #define IPSFactoryBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
76 #define IPSFactoryBuffer_AddRef(p)             ICOM_CALL (AddRef,p)
77 #define IPSFactoryBuffer_Release(p)            ICOM_CALL (Release,p)
78 /*** IPSFactoryBuffer methods ***/
79 #define IPSFactoryBuffer_CreateProxy(p,a,b,c,d) ICOM_CALL4(CreateProxy,p,a,b,c,d)
80 #define IPSFactoryBuffer_CreateStub(p,a,b,c)    ICOM_CALL3(CreateStub,p,a,b,c)
81
82
83 /*****************************************************************************
84  * IRpcChannelBuffer interface
85  */
86 typedef unsigned long RPCOLEDATAREP;
87
88 typedef struct tagRPCOLEMESSAGE
89 {
90     void* reserved1;
91     RPCOLEDATAREP dataRepresentation;
92     void* Buffer;
93     ULONG cbBuffer;
94     ULONG iMethod;
95     void* reserved2[5];
96     ULONG rpcFlags;
97 } RPCOLEMESSAGE, *PRPCOLEMESSAGE;
98
99 #define ICOM_INTERFACE IRpcChannelBuffer
100 #define IRpcChannelBuffer_METHODS \
101     ICOM_METHOD2(HRESULT,GetBuffer,   RPCOLEMESSAGE*,pMessage, REFIID,riid) \
102     ICOM_METHOD2(HRESULT,SendReceive, RPCOLEMESSAGE*,pMessage, ULONG*,pStatus) \
103     ICOM_METHOD1(HRESULT,FreeBuffer,  RPCOLEMESSAGE*,pMessage) \
104     ICOM_METHOD2(HRESULT,GetDestCtx,  DWORD*,pdwDestContext, void**,ppvDestContext) \
105     ICOM_METHOD (HRESULT,IsConnected)
106 #define IRpcChannelBuffer_IMETHODS \
107     IUnknown_IMETHODS \
108     IRpcChannelBuffer_METHODS
109 ICOM_DEFINE(IRpcChannelBuffer,IUnknown)
110 #undef ICOM_INTERFACE
111
112 /*** IUnknown methods ***/
113 #define IRpcChannelBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
114 #define IRpcChannelBuffer_AddRef(p)             ICOM_CALL (AddRef,p)
115 #define IRpcChannelBuffer_Release(p)            ICOM_CALL (Release,p)
116 /*** IRpcChannelBuffer methods ***/
117 #define IRpcChannelBuffer_GetBuffer(p,a,b)   ICOM_CALL2(GetBuffer,p,a,b)
118 #define IRpcChannelBuffer_SendReceive(p,a,b) ICOM_CALL2(SendReceive,p,a,b)
119 #define IRpcChannelBuffer_FreeBuffer(p,a)    ICOM_CALL1(FreeBuffer,p,a)
120 #define IRpcChannelBuffer_GetDestCtx(p,a,b)  ICOM_CALL2(GetDestCtx,p,a,b)
121 #define IRpcChannelBuffer_IsConnected(p)     ICOM_CALL (IsConnected,p)
122
123
124 /*****************************************************************************
125  * IRpcProxyBuffer interface
126  */
127 #define ICOM_INTERFACE IRpcProxyBuffer
128 #define IRpcProxyBuffer_METHODS \
129     ICOM_METHOD1(HRESULT,Connect,   IRpcChannelBuffer*,pRpcChannelBuffer) \
130     ICOM_VMETHOD(        Disconnect)
131 #define IRpcProxyBuffer_IMETHODS \
132     IUnknown_IMETHODS \
133     IRpcProxyBuffer_METHODS
134 ICOM_DEFINE(IRpcProxyBuffer,IUnknown)
135 #undef ICOM_INTERFACE
136
137 /*** IUnknown methods ***/
138 #define IRpcProxyBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
139 #define IRpcProxyBuffer_AddRef(p)             ICOM_CALL (AddRef,p)
140 #define IRpcProxyBuffer_Release(p)            ICOM_CALL (Release,p)
141 /*** IRpcProxyBuffer methods ***/
142 #define IRpcProxyBuffer_Connect(p,a)  ICOM_CALL2(Connect,p,a)
143 #define IRpcProxyBuffer_Disconnect(p) ICOM_CALL (Disconnect,p)
144
145
146 /*****************************************************************************
147  * IRpcStubBuffer interface
148  */
149 #define ICOM_INTERFACE IRpcStubBuffer
150 #define IRpcStubBuffer_METHODS \
151     ICOM_METHOD1 (HRESULT,        Connect,                   IUnknown*,pUnkServer) \
152     ICOM_VMETHOD (                Disconnect) \
153     ICOM_METHOD2 (HRESULT,        Invoke,                    RPCOLEMESSAGE*,_prpcmsg, IRpcChannelBuffer*,_pRpcChannelBuffer) \
154     ICOM_METHOD1 (LPRPCCHANNELBUFFER,IsIIDSupported,            REFIID,riid) \
155     ICOM_METHOD  (ULONG,          CountRefs) \
156     ICOM_METHOD1 (HRESULT,        DebugServerQueryInterface, void**,ppv) \
157     ICOM_VMETHOD1(                DebugServerRelease,        void*,pv)
158 #define IRpcStubBuffer_IMETHODS \
159     IUnknown_IMETHODS \
160     IRpcStubBuffer_METHODS
161 ICOM_DEFINE(IRpcStubBuffer,IUnknown)
162 #undef ICOM_INTERFACE
163
164 /*** IUnknown methods ***/
165 #define IRpcStubBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
166 #define IRpcStubBuffer_AddRef(p)             ICOM_CALL (AddRef,p)
167 #define IRpcStubBuffer_Release(p)            ICOM_CALL (Release,p)
168 /*** IRpcStubBuffer methods ***/
169 #define IRpcStubBuffer_Connect(p,a)                   ICOM_CALL1(Connect,p,a)
170 #define IRpcStubBuffer_Disconnect(p)                  ICOM_CALL (Disconnect,p)
171 #define IRpcStubBuffer_Invoke(p,a,b)                  ICOM_CALL2(Invoke,p,a,b)
172 #define IRpcStubBuffer_IsIIDSupported(p,a)            ICOM_CALL1(IsIIDSupported,p,a)
173 #define IRpcStubBuffer_CountRefs(p)                   ICOM_CALL (CountRefs,p)
174 #define IRpcStubBuffer_DebugServerQueryInterface(p,a) ICOM_CALL1(DebugServerQueryInterface,p,a)
175 #define IRpcStubBuffer_DebugServerRelease(p,a)        ICOM_CALL1(DebugServerRelease,p,a)
176
177 #ifdef __cplusplus
178 } /* extern "C" */
179 #endif /* defined(__cplusplus) */
180
181 #endif /* __WINE_WINE_OBJ_CHANNEL_H */