- Fix some spelling problems.
[wine/multimedia.git] / include / rpcproxy.h
blob90b5fefa674b663c8c457e9ced1ec2bf84ca395a
1 /*
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
22 #include "basetsd.h"
23 #include "guiddef.h"
24 #include "rpc.h"
25 #include "rpcndr.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;
43 LONG_PTR Filler2;
44 LONG_PTR Filler3;
45 LONG_PTR Filler4;
46 } ProxyFileInfo;
48 typedef ProxyFileInfo ExtendedProxyFileInfo;
50 typedef struct tagCInterfaceProxyHeader
52 #ifdef USE_STUBLESS_PROXY
53 const void *pStublessProxyInfo;
54 #endif
55 const IID *piid;
56 } CInterfaceProxyHeader;
58 #define CINTERFACE_PROXY_VTABLE(n) \
59 struct \
60 { \
61 CInterfaceProxyHeader header; \
62 void *Vtbl[n]; \
65 typedef struct tagCInterfaceProxyVtbl
67 CInterfaceProxyHeader header;
68 #if defined(__GNUC__)
69 void *Vtbl[0];
70 #else
71 void *Vtbl[1];
72 #endif
73 } CInterfaceProxyVtbl;
75 typedef void (__RPC_STUB *PRPC_STUB_FUNCTION)(
76 IRpcStubBuffer *This,
77 IRpcChannelBuffer *_pRpcChannelBuffer,
78 PRPC_MESSAGE _pRpcMessage,
79 DWORD *pdwStubPhase);
81 typedef struct tagCInterfaceStubHeader
83 const IID *piid;
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;
93 } CInterfaceStubVtbl;
95 typedef struct tagCStdStubBuffer
97 const ICOM_VTABLE(IRpcStubBuffer) *lpVtbl;
98 long RefCount;
99 struct IUnknown *pvServerObject;
100 const struct ICallFactoryVtbl *pCallFactoryVtbl;
101 const IID *pAsyncIID;
102 struct IPSFactoryBuffer *pPSFactory;
103 } CStdStubBuffer;
105 typedef struct tagCStdPSFactoryBuffer
107 const IPSFactoryBufferVtbl *lpVtbl;
108 long RefCount;
109 const ProxyFileInfo **pProxyFileList;
110 long Filler1;
111 } CStdPSFactoryBuffer;
113 HRESULT WINAPI
114 CStdStubBuffer_QueryInterface( IRpcStubBuffer *This, REFIID riid, void **ppvObject );
115 ULONG WINAPI
116 CStdStubBuffer_AddRef( IRpcStubBuffer *This );
117 ULONG WINAPI
118 CStdStubBuffer_Release( IRpcStubBuffer *This );
119 ULONG WINAPI
120 NdrCStdStubBuffer_Release( IRpcStubBuffer *This, IPSFactoryBuffer *pPSF );
121 HRESULT WINAPI
122 CStdStubBuffer_Connect( IRpcStubBuffer *This, IUnknown *pUnkServer );
123 void WINAPI
124 CStdStubBuffer_Disconnect( IRpcStubBuffer *This );
125 HRESULT WINAPI
126 CStdStubBuffer_Invoke( IRpcStubBuffer *This, RPCOLEMESSAGE *pRpcMsg, IRpcChannelBuffer *pRpcChannelBuffer );
127 IRpcStubBuffer * WINAPI
128 CStdStubBuffer_IsIIDSupported( IRpcStubBuffer *This, REFIID riid );
129 ULONG WINAPI
130 CStdStubBuffer_CountRefs( IRpcStubBuffer *This );
131 HRESULT WINAPI
132 CStdStubBuffer_DebugServerQueryInterface( IRpcStubBuffer *This, void **ppv );
133 void WINAPI
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 );
174 #endif
176 #endif /*__WINE_RPCDCE_H */