2 * Copyright (C) 2001 Ove Kaaven
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_RPCPROXY_H
20 #define __WINE_RPCPROXY_H
25 typedef struct tagCInterfaceStubVtbl *PCInterfaceStubVtblList;
26 typedef struct tagCInterfaceProxyVtbl *PCInterfaceProxyVtblList;
27 typedef const char *PCInterfaceName;
28 typedef int __stdcall IIDLookupRtn( const IID *pIID, int *pIndex );
29 typedef IIDLookupRtn *PIIDLookup;
31 typedef struct tagProxyFileInfo
33 const PCInterfaceProxyVtblList *pProxyVtblList;
34 const PCInterfaceStubVtblList *pStubVtblList;
35 const PCInterfaceName *pNamesArray;
36 const IID **pDelegatedIIDs;
37 const PIIDLookup pIIDLookupRtn;
38 unsigned short TableSize;
39 unsigned short TableVersion;
40 const IID **pAsyncIIDLookup;
46 typedef ProxyFileInfo ExtendedProxyFileInfo;
51 typedef struct tagCInterfaceProxyHeader
53 #ifdef USE_STUBLESS_PROXY
54 const void *pStublessProxyInfo;
57 } CInterfaceProxyHeader;
59 #define CINTERFACE_PROXY_VTABLE(n) \
62 CInterfaceProxyHeader header; \
66 typedef struct tagCInterfaceProxyVtbl
68 CInterfaceProxyHeader header;
74 } CInterfaceProxyVtbl;
76 typedef void (__RPC_STUB *PRPC_STUB_FUNCTION)(
78 IRpcChannelBuffer *_pRpcChannelBuffer,
79 PRPC_MESSAGE _pRpcMessage,
82 typedef struct tagCInterfaceStubHeader
85 const MIDL_SERVER_INFO *pServerInfo;
86 unsigned long DispatchTableCount;
87 const PRPC_STUB_FUNCTION *pDispatchTable;
88 } CInterfaceStubHeader;
90 typedef struct tagCInterfaceStubVtbl
92 CInterfaceStubHeader header;
93 ICOM_VTABLE(IRpcStubBuffer) Vtbl;
96 typedef struct tagCStdStubBuffer
98 const ICOM_VTABLE(IRpcStubBuffer) *lpVtbl;
100 struct IUnknown *pvServerObject;
101 const struct ICallFactoryVtbl *pCallFactoryVtbl;
102 const IID *pAsyncIID;
103 struct IPSFactoryBuffer *pPSFactory;
106 typedef struct tagCStdPSFactoryBuffer
108 const IPSFactoryBufferVtbl *lpVtbl;
110 const ProxyFileInfo **pProxyFileList;
112 } CStdPSFactoryBuffer;
115 CStdStubBuffer_QueryInterface( IRpcStubBuffer *This, REFIID riid, void **ppvObject );
117 CStdStubBuffer_AddRef( IRpcStubBuffer *This );
119 CStdStubBuffer_Release( IRpcStubBuffer *This );
121 NdrCStdStubBuffer_Release( IRpcStubBuffer *This, IPSFactoryBuffer *pPSF );
123 CStdStubBuffer_Connect( IRpcStubBuffer *This, IUnknown *pUnkServer );
125 CStdStubBuffer_Disconnect( IRpcStubBuffer *This );
127 CStdStubBuffer_Invoke( IRpcStubBuffer *This, RPCOLEMESSAGE *pRpcMsg, IRpcChannelBuffer *pRpcChannelBuffer );
128 IRpcStubBuffer * WINAPI
129 CStdStubBuffer_IsIIDSupported( IRpcStubBuffer *This, REFIID riid );
131 CStdStubBuffer_CountRefs( IRpcStubBuffer *This );
133 CStdStubBuffer_DebugServerQueryInterface( IRpcStubBuffer *This, void **ppv );
135 CStdStubBuffer_DebugServerRelease( IRpcStubBuffer *This, void *pv );
137 #define CStdStubBuffer_METHODS \
138 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE \
139 CStdStubBuffer_QueryInterface, \
140 CStdStubBuffer_AddRef, \
141 CStdStubBuffer_Release, \
142 CStdStubBuffer_Connect, \
143 CStdStubBuffer_Disconnect, \
144 CStdStubBuffer_Invoke, \
145 CStdStubBuffer_IsIIDSupported, \
146 CStdStubBuffer_CountRefs, \
147 CStdStubBuffer_DebugServerQueryInterface, \
148 CStdStubBuffer_DebugServerRelease
150 RPCRTAPI HRESULT RPC_ENTRY
151 NdrDllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv, const ProxyFileInfo **pProxyFileList,
152 const CLSID *pclsid, CStdPSFactoryBuffer *pPSFactoryBuffer );
153 RPCRTAPI HRESULT RPC_ENTRY
154 NdrDllCanUnloadNow( CStdPSFactoryBuffer *pPSFactoryBuffer );
156 RPCRTAPI HRESULT RPC_ENTRY
157 NdrDllRegisterProxy( HMODULE hDll, const ProxyFileInfo **pProxyFileList, const CLSID *pclsid );
158 RPCRTAPI HRESULT RPC_ENTRY
159 NdrDllUnregisterProxy( HMODULE hDll, const ProxyFileInfo **pProxyFileList, const CLSID *pclsid );
161 #define CSTDSTUBBUFFERRELEASE(pFactory) \
162 ULONG WINAPI CStdStubBuffer_Release(IRpcStubBuffer *This) \
163 { return NdrCStdStubBuffer_Release(This, (IPSFactoryBuffer *)pFactory); }
165 #if defined(__WINE__) && defined(__WINE_WINE_OBJ_OLEAUT_H)
166 /* see http://msdn.microsoft.com/library/en-us/dnmsj99/html/com0199.asp?frame=true */
168 RPCRTAPI HRESULT RPC_ENTRY
169 CreateProxyFromTypeInfo( LPTYPEINFO pTypeInfo, LPUNKNOWN pUnkOuter, REFIID riid,
170 LPRPCPROXYBUFFER *ppProxy, LPVOID *ppv );
171 RPCRTAPI HRESULT RPC_ENTRY
172 CreateStubFromTypeInfo( LPTYPEINFO pTypeInfo, REFIID riid, LPUNKNOWN pUnkServer,
173 LPRPCSTUBBUFFER *ppStub );
177 #endif /*__WINE_RPCDCE_H */