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
27 typedef struct tagCInterfaceStubVtbl
*PCInterfaceStubVtblList
;
28 typedef struct tagCInterfaceProxyVtbl
*PCInterfaceProxyVtblList
;
29 typedef const char *PCInterfaceName
;
30 typedef int __stdcall
IIDLookupRtn( const IID
*pIID
, int *pIndex
);
31 typedef IIDLookupRtn
*PIIDLookup
;
33 typedef struct tagProxyFileInfo
35 const PCInterfaceProxyVtblList
*pProxyVtblList
;
36 const PCInterfaceStubVtblList
*pStubVtblList
;
37 const PCInterfaceName
*pNamesArray
;
38 const IID
**pDelegatedIIDs
;
39 const PIIDLookup pIIDLookupRtn
;
40 unsigned short TableSize
;
41 unsigned short TableVersion
;
42 const IID
**pAsyncIIDLookup
;
48 typedef ProxyFileInfo ExtendedProxyFileInfo
;
50 typedef struct tagCInterfaceProxyHeader
52 #ifdef USE_STUBLESS_PROXY
53 const void *pStublessProxyInfo
;
56 } CInterfaceProxyHeader
;
58 #define CINTERFACE_PROXY_VTABLE(n) \
61 CInterfaceProxyHeader header; \
65 typedef struct tagCInterfaceProxyVtbl
67 CInterfaceProxyHeader header
;
73 } CInterfaceProxyVtbl
;
75 typedef void (__RPC_STUB
*PRPC_STUB_FUNCTION
)(
77 IRpcChannelBuffer
*_pRpcChannelBuffer
,
78 PRPC_MESSAGE _pRpcMessage
,
81 typedef struct tagCInterfaceStubHeader
84 const MIDL_SERVER_INFO
*pServerInfo
;
85 unsigned long DispatchTableCount
;
86 const PRPC_STUB_FUNCTION
*pDispatchTable
;
87 } CInterfaceStubHeader
;
89 typedef struct tagCInterfaceStubVtbl
91 CInterfaceStubHeader header
;
92 ICOM_VTABLE(IRpcStubBuffer
) Vtbl
;
95 typedef struct tagCStdStubBuffer
97 const ICOM_VTABLE(IRpcStubBuffer
) *lpVtbl
;
99 struct IUnknown
*pvServerObject
;
100 const struct ICallFactoryVtbl
*pCallFactoryVtbl
;
101 const IID
*pAsyncIID
;
102 struct IPSFactoryBuffer
*pPSFactory
;
105 typedef struct tagCStdPSFactoryBuffer
107 const IPSFactoryBufferVtbl
*lpVtbl
;
109 const ProxyFileInfo
**pProxyFileList
;
111 } CStdPSFactoryBuffer
;
114 CStdStubBuffer_QueryInterface( IRpcStubBuffer
*This
, REFIID riid
, void **ppvObject
);
116 CStdStubBuffer_AddRef( IRpcStubBuffer
*This
);
118 CStdStubBuffer_Release( IRpcStubBuffer
*This
);
120 NdrCStdStubBuffer_Release( IRpcStubBuffer
*This
, IPSFactoryBuffer
*pPSF
);
122 CStdStubBuffer_Connect( IRpcStubBuffer
*This
, IUnknown
*pUnkServer
);
124 CStdStubBuffer_Disconnect( IRpcStubBuffer
*This
);
126 CStdStubBuffer_Invoke( IRpcStubBuffer
*This
, RPCOLEMESSAGE
*pRpcMsg
, IRpcChannelBuffer
*pRpcChannelBuffer
);
127 IRpcStubBuffer
* WINAPI
128 CStdStubBuffer_IsIIDSupported( IRpcStubBuffer
*This
, REFIID riid
);
130 CStdStubBuffer_CountRefs( IRpcStubBuffer
*This
);
132 CStdStubBuffer_DebugServerQueryInterface( IRpcStubBuffer
*This
, void **ppv
);
134 CStdStubBuffer_DebugServerRelease( IRpcStubBuffer
*This
, void *pv
);
136 #define CStdStubBuffer_METHODS \
137 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE \
138 CStdStubBuffer_QueryInterface, \
139 CStdStubBuffer_AddRef, \
140 CStdStubBuffer_Release, \
141 CStdStubBuffer_Connect, \
142 CStdStubBuffer_Disconnect, \
143 CStdStubBuffer_Invoke, \
144 CStdStubBuffer_IsIIDSupported, \
145 CStdStubBuffer_CountRefs, \
146 CStdStubBuffer_DebugServerQueryInterface, \
147 CStdStubBuffer_DebugServerRelease
149 RPCRTAPI HRESULT RPC_ENTRY
150 NdrDllGetClassObject( REFCLSID rclsid
, REFIID riid
, void **ppv
, const ProxyFileInfo
**pProxyFileList
,
151 const CLSID
*pclsid
, CStdPSFactoryBuffer
*pPSFactoryBuffer
);
152 RPCRTAPI HRESULT RPC_ENTRY
153 NdrDllCanUnloadNow( CStdPSFactoryBuffer
*pPSFactoryBuffer
);
155 RPCRTAPI HRESULT RPC_ENTRY
156 NdrDllRegisterProxy( HMODULE hDll
, const ProxyFileInfo
**pProxyFileList
, const CLSID
*pclsid
);
157 RPCRTAPI HRESULT RPC_ENTRY
158 NdrDllUnregisterProxy( HMODULE hDll
, const ProxyFileInfo
**pProxyFileList
, const CLSID
*pclsid
);
160 #define CSTDSTUBBUFFERRELEASE(pFactory) \
161 ULONG WINAPI CStdStubBuffer_Release(IRpcStubBuffer *This) \
162 { return NdrCStdStubBuffer_Release(This, (IPSFactoryBuffer *)pFactory); }
164 #if defined(__WINE__) && defined(__WINE_WINE_OBJ_OLEAUT_H)
165 /* see http://msdn.microsoft.com/library/en-us/dnmsj99/html/com0199.asp?frame=true */
167 RPCRTAPI HRESULT RPC_ENTRY
168 CreateProxyFromTypeInfo( LPTYPEINFO pTypeInfo
, LPUNKNOWN pUnkOuter
, REFIID riid
,
169 LPRPCPROXYBUFFER
*ppProxy
, LPVOID
*ppv
);
170 RPCRTAPI HRESULT RPC_ENTRY
171 CreateStubFromTypeInfo( LPTYPEINFO pTypeInfo
, REFIID riid
, LPUNKNOWN pUnkServer
,
172 LPRPCSTUBBUFFER
*ppStub
);
176 #endif /*__WINE_RPCDCE_H */