ReactOS 0.4.16-dev-1946-g52006dd
rpcproxy.h File Reference
#include <basetsd.h>
#include <guiddef.h>
#include <rpc.h>
#include <rpcndr.h>
Include dependency graph for rpcproxy.h:

Go to the source code of this file.

Classes

struct  tagProxyFileInfo
 
struct  tagCInterfaceProxyHeader
 
struct  tagCInterfaceProxyVtbl
 
struct  tagCInterfaceStubHeader
 
struct  tagCInterfaceStubVtbl
 
struct  tagCStdStubBuffer
 
struct  tagCStdPSFactoryBuffer
 

Macros

#define __RPCPROXY_H_VERSION__   (477)
 
#define __midl_proxy
 
#define CINTERFACE_PROXY_VTABLE(n)
 
#define STUB_FORWARDING_FUNCTION   NdrStubForwardingFunction
 
#define CStdStubBuffer_DELEGATING_METHODS   0, 0, CStdStubBuffer2_Release, 0, 0, 0, 0, 0, 0, 0
 
#define CStdStubBuffer_METHODS
 
#define CSTDSTUBBUFFERRELEASE(pFactory)
 
#define CSTDSTUBBUFFER2RELEASE(pFactory)
 
#define IID_GENERIC_CHECK_IID(name, pIID, index)   memcmp(pIID, name##_ProxyVtblList[index]->header.piid, sizeof(IID))
 
#define IID_BS_LOOKUP_SETUP    int c;
 
#define IID_BS_LOOKUP_INITIAL_TEST(name, sz, split)
 
#define IID_BS_LOOKUP_NEXT_TEST(name, split)
 
#define IID_BS_LOOKUP_RETURN_RESULT(name, sz, index)
 
#define EXTERN_PROXY_FILE(proxy)    EXTERN_C const ProxyFileInfo proxy##_ProxyFileInfo;
 
#define PROXYFILE_LIST_START
 
#define REFERENCE_PROXY_FILE(proxy)    & proxy##_ProxyFileInfo
 
#define PROXYFILE_LIST_END
 
#define CLSID_PSFACTORYBUFFER
 
#define GET_DLL_CLSID
 
#define DLLREGISTERSERVER_ENTRY   DllRegisterServer
 
#define DLLUNREGISTERSERVER_ENTRY   DllUnregisterServer
 
#define DLLMAIN_ENTRY   DllMain
 
#define DLLGETCLASSOBJECT_ENTRY   DllGetClassObject
 
#define DLLCANUNLOADNOW_ENTRY   DllCanUnloadNow
 
#define WINE_DO_REGISTER_DLL(pfl, clsid)   return NdrDllRegisterProxy( hProxyDll, (pfl), (clsid) )
 
#define WINE_DO_UNREGISTER_DLL(pfl, clsid)   return NdrDllUnregisterProxy( hProxyDll, (pfl), (clsid) )
 
#define DLLDATA_GETPROXYDLLINFO(pfl, rclsid)
 
#define DLLGETCLASSOBJECTROUTINE(pfl, factory_clsid, factory)
 
#define DLLCANUNLOADNOW(factory)
 
#define REGISTER_PROXY_DLL_ROUTINES(pfl, factory_clsid)
 
#define DLLREGISTRY_ROUTINES(pfl, factory_clsid)
 
#define DLLDATA_ROUTINES(pfl, factory_clsid)
 

Typedefs

typedef struct tagCInterfaceStubVtblPCInterfaceStubVtblList
 
typedef struct tagCInterfaceProxyVtblPCInterfaceProxyVtblList
 
typedef const charPCInterfaceName
 
typedef int __stdcall IIDLookupRtn(const IID *pIID, int *pIndex)
 
typedef IIDLookupRtnPIIDLookup
 
typedef struct tagProxyFileInfo ProxyFileInfo
 
typedef ProxyFileInfo ExtendedProxyFileInfo
 
typedef struct tagCInterfaceProxyHeader CInterfaceProxyHeader
 
typedef struct tagCInterfaceProxyVtbl CInterfaceProxyVtbl
 
typedef void(__RPC_STUBPRPC_STUB_FUNCTION) (IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *pdwStubPhase)
 
typedef struct tagCInterfaceStubHeader CInterfaceStubHeader
 
typedef struct tagCInterfaceStubVtbl CInterfaceStubVtbl
 
typedef struct tagCStdStubBuffer CStdStubBuffer
 
typedef struct tagCStdPSFactoryBuffer CStdPSFactoryBuffer
 

Functions

RPCRTAPI HRESULT WINAPI CStdStubBuffer_QueryInterface (IRpcStubBuffer *This, REFIID riid, void **ppvObject)
 
RPCRTAPI ULONG WINAPI CStdStubBuffer_AddRef (IRpcStubBuffer *This)
 
RPCRTAPI HRESULT WINAPI CStdStubBuffer_Connect (IRpcStubBuffer *This, IUnknown *pUnkServer)
 
RPCRTAPI void WINAPI CStdStubBuffer_Disconnect (IRpcStubBuffer *This)
 
RPCRTAPI HRESULT WINAPI CStdStubBuffer_Invoke (IRpcStubBuffer *This, RPCOLEMESSAGE *pRpcMsg, IRpcChannelBuffer *pRpcChannelBuffer)
 
RPCRTAPI IRpcStubBuffer *WINAPI CStdStubBuffer_IsIIDSupported (IRpcStubBuffer *This, REFIID riid)
 
RPCRTAPI ULONG WINAPI CStdStubBuffer_CountRefs (IRpcStubBuffer *This)
 
RPCRTAPI HRESULT WINAPI CStdStubBuffer_DebugServerQueryInterface (IRpcStubBuffer *This, void **ppv)
 
RPCRTAPI void WINAPI CStdStubBuffer_DebugServerRelease (IRpcStubBuffer *This, void *pv)
 
RPCRTAPI ULONG WINAPI NdrCStdStubBuffer_Release (IRpcStubBuffer *This, IPSFactoryBuffer *pPSF)
 
RPCRTAPI ULONG WINAPI NdrCStdStubBuffer2_Release (IRpcStubBuffer *This, IPSFactoryBuffer *pPSF)
 
ULONG STDMETHODCALLTYPE CStdStubBuffer_Release (IRpcStubBuffer *This)
 
ULONG STDMETHODCALLTYPE CStdStubBuffer2_Release (IRpcStubBuffer *This)
 
RPCRTAPI void RPC_ENTRY NdrProxyInitialize (void *This, PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDescriptor, unsigned int ProcNum)
 
RPCRTAPI void RPC_ENTRY NdrProxyGetBuffer (void *This, PMIDL_STUB_MESSAGE pStubMsg)
 
RPCRTAPI void RPC_ENTRY NdrProxySendReceive (void *This, PMIDL_STUB_MESSAGE pStubMsg)
 
RPCRTAPI void RPC_ENTRY NdrProxyFreeBuffer (void *This, PMIDL_STUB_MESSAGE pStubMsg)
 
RPCRTAPI HRESULT RPC_ENTRY NdrProxyErrorHandler (DWORD dwExceptionCode)
 
RPCRTAPI void RPC_ENTRY NdrStubInitialize (PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDescriptor, IRpcChannelBuffer *pRpcChannelBuffer)
 
RPCRTAPI void RPC_ENTRY NdrStubInitializePartial (PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDescriptor, IRpcChannelBuffer *pRpcChannelBuffer, ULONG RequestedBufferSize)
 
void __RPC_STUB NdrStubForwardingFunction (IRpcStubBuffer *This, IRpcChannelBuffer *pChannel, PRPC_MESSAGE pMsg, DWORD *pdwStubPhase)
 
RPCRTAPI void RPC_ENTRY NdrStubGetBuffer (IRpcStubBuffer *This, IRpcChannelBuffer *pRpcChannelBuffer, PMIDL_STUB_MESSAGE pStubMsg)
 
RPCRTAPI HRESULT RPC_ENTRY NdrStubErrorHandler (DWORD dwExceptionCode)
 
RPCRTAPI HRESULT RPC_ENTRY NdrDllGetClassObject (REFCLSID rclsid, REFIID riid, void **ppv, const ProxyFileInfo **pProxyFileList, const CLSID *pclsid, CStdPSFactoryBuffer *pPSFactoryBuffer)
 
RPCRTAPI HRESULT RPC_ENTRY NdrDllCanUnloadNow (CStdPSFactoryBuffer *pPSFactoryBuffer)
 
RPCRTAPI HRESULT RPC_ENTRY NdrDllRegisterProxy (HMODULE hDll, const ProxyFileInfo **pProxyFileList, const CLSID *pclsid)
 
RPCRTAPI HRESULT RPC_ENTRY NdrDllUnregisterProxy (HMODULE hDll, const ProxyFileInfo **pProxyFileList, const CLSID *pclsid)
 
HRESULT __cdecl __wine_register_resources (HMODULE module)
 
HRESULT __cdecl __wine_unregister_resources (HMODULE module)
 

Macro Definition Documentation

◆ __midl_proxy

#define __midl_proxy

Definition at line 26 of file rpcproxy.h.

◆ __RPCPROXY_H_VERSION__

#define __RPCPROXY_H_VERSION__   (477)

Definition at line 20 of file rpcproxy.h.

◆ CINTERFACE_PROXY_VTABLE

#define CINTERFACE_PROXY_VTABLE (   n)
Value:
struct \
{ \
void *Vtbl[n]; \
}
GLdouble n
Definition: glext.h:7729

Definition at line 70 of file rpcproxy.h.

◆ CLSID_PSFACTORYBUFFER

#define CLSID_PSFACTORYBUFFER

Definition at line 253 of file rpcproxy.h.

◆ CSTDSTUBBUFFER2RELEASE

#define CSTDSTUBBUFFER2RELEASE (   pFactory)

Definition at line 208 of file rpcproxy.h.

◆ CStdStubBuffer_DELEGATING_METHODS

#define CStdStubBuffer_DELEGATING_METHODS   0, 0, CStdStubBuffer2_Release, 0, 0, 0, 0, 0, 0, 0

Definition at line 123 of file rpcproxy.h.

◆ CStdStubBuffer_METHODS

#define CStdStubBuffer_METHODS
Value:
RPCRTAPI HRESULT WINAPI CStdStubBuffer_DebugServerQueryInterface(IRpcStubBuffer *This, void **ppv)
RPCRTAPI IRpcStubBuffer *WINAPI CStdStubBuffer_IsIIDSupported(IRpcStubBuffer *This, REFIID riid)
RPCRTAPI HRESULT WINAPI CStdStubBuffer_Invoke(IRpcStubBuffer *This, RPCOLEMESSAGE *pRpcMsg, IRpcChannelBuffer *pRpcChannelBuffer)
RPCRTAPI ULONG WINAPI CStdStubBuffer_AddRef(IRpcStubBuffer *This)
RPCRTAPI HRESULT WINAPI CStdStubBuffer_QueryInterface(IRpcStubBuffer *This, REFIID riid, void **ppvObject)
RPCRTAPI ULONG WINAPI CStdStubBuffer_CountRefs(IRpcStubBuffer *This)
RPCRTAPI void WINAPI CStdStubBuffer_DebugServerRelease(IRpcStubBuffer *This, void *pv)
RPCRTAPI void WINAPI CStdStubBuffer_Disconnect(IRpcStubBuffer *This)
RPCRTAPI HRESULT WINAPI CStdStubBuffer_Connect(IRpcStubBuffer *This, IUnknown *pUnkServer)
ULONG STDMETHODCALLTYPE CStdStubBuffer_Release(IRpcStubBuffer *This)

Definition at line 140 of file rpcproxy.h.

◆ CSTDSTUBBUFFERRELEASE

#define CSTDSTUBBUFFERRELEASE (   pFactory)
Value:
RPCRTAPI ULONG WINAPI NdrCStdStubBuffer_Release(IRpcStubBuffer *This, IPSFactoryBuffer *pPSF)
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6

Definition at line 199 of file rpcproxy.h.

◆ DLLCANUNLOADNOW

#define DLLCANUNLOADNOW (   factory)
Value:
{ \
}
RPCRTAPI HRESULT RPC_ENTRY NdrDllCanUnloadNow(CStdPSFactoryBuffer *pPSFactoryBuffer)
Definition: cpsf.c:209
#define DLLCANUNLOADNOW_ENTRY
Definition: rpcproxy.h:277
Definition: main.c:439

Definition at line 313 of file rpcproxy.h.

◆ DLLCANUNLOADNOW_ENTRY

#define DLLCANUNLOADNOW_ENTRY   DllCanUnloadNow

Definition at line 277 of file rpcproxy.h.

◆ DLLDATA_GETPROXYDLLINFO

#define DLLDATA_GETPROXYDLLINFO (   pfl,
  rclsid 
)
Value:
void RPC_ENTRY GetProxyDllInfo(const ProxyFileInfo ***ppProxyFileInfo, \
const CLSID **ppClsid); \
void RPC_ENTRY GetProxyDllInfo(const ProxyFileInfo ***ppProxyFileInfo, \
const CLSID **ppClsid) \
{ \
*ppProxyFileInfo = (pfl); \
*ppClsid = (rclsid); \
}
#define RPC_ENTRY
Definition: rpc.h:63

Definition at line 294 of file rpcproxy.h.

◆ DLLDATA_ROUTINES

#define DLLDATA_ROUTINES (   pfl,
  factory_clsid 
)
Value:
CLSID_PSFACTORYBUFFER \
CStdPSFactoryBuffer gPFactory = { NULL, 0, NULL, 0 }; \
DLLDATA_GETPROXYDLLINFO(pfl, factory_clsid) \
DLLGETCLASSOBJECTROUTINE(pfl, factory_clsid, &gPFactory) \
DLLCANUNLOADNOW(&gPFactory) \
CSTDSTUBBUFFERRELEASE(&gPFactory) \
CSTDSTUBBUFFER2RELEASE(&gPFactory) \
DLLREGISTRY_ROUTINES(pfl, factory_clsid)
#define NULL
Definition: types.h:112
CStdPSFactoryBuffer gPFactory

Definition at line 354 of file rpcproxy.h.

◆ DLLGETCLASSOBJECT_ENTRY

#define DLLGETCLASSOBJECT_ENTRY   DllGetClassObject

Definition at line 276 of file rpcproxy.h.

◆ DLLGETCLASSOBJECTROUTINE

#define DLLGETCLASSOBJECTROUTINE (   pfl,
  factory_clsid,
  factory 
)
Value:
void **ppv) \
{ \
return NdrDllGetClassObject(rclsid, riid, ppv, (pfl), \
(factory_clsid), factory); \
}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
RPCRTAPI HRESULT RPC_ENTRY NdrDllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv, const ProxyFileInfo **pProxyFileList, const CLSID *pclsid, CStdPSFactoryBuffer *pPSFactoryBuffer)
#define DLLGETCLASSOBJECT_ENTRY
Definition: rpcproxy.h:276

Definition at line 304 of file rpcproxy.h.

◆ DLLMAIN_ENTRY

#define DLLMAIN_ENTRY   DllMain

Definition at line 275 of file rpcproxy.h.

◆ DLLREGISTERSERVER_ENTRY

#define DLLREGISTERSERVER_ENTRY   DllRegisterServer

Definition at line 273 of file rpcproxy.h.

◆ DLLREGISTRY_ROUTINES

#define DLLREGISTRY_ROUTINES (   pfl,
  factory_clsid 
)

Definition at line 351 of file rpcproxy.h.

◆ DLLUNREGISTERSERVER_ENTRY

#define DLLUNREGISTERSERVER_ENTRY   DllUnregisterServer

Definition at line 274 of file rpcproxy.h.

◆ EXTERN_PROXY_FILE

#define EXTERN_PROXY_FILE (   proxy)     EXTERN_C const ProxyFileInfo proxy##_ProxyFileInfo;

Definition at line 228 of file rpcproxy.h.

◆ GET_DLL_CLSID

#define GET_DLL_CLSID
Value:
const ProxyFileInfo * aProxyFileList
const IID * piid
Definition: rpcproxy.h:91
CInterfaceStubHeader header
Definition: rpcproxy.h:99
const PCInterfaceStubVtblList * pStubVtblList
Definition: rpcproxy.h:48

Definition at line 258 of file rpcproxy.h.

◆ IID_BS_LOOKUP_INITIAL_TEST

#define IID_BS_LOOKUP_INITIAL_TEST (   name,
  sz,
  split 
)

Definition at line 221 of file rpcproxy.h.

◆ IID_BS_LOOKUP_NEXT_TEST

#define IID_BS_LOOKUP_NEXT_TEST (   name,
  split 
)

Definition at line 222 of file rpcproxy.h.

◆ IID_BS_LOOKUP_RETURN_RESULT

#define IID_BS_LOOKUP_RETURN_RESULT (   name,
  sz,
  index 
)
Value:
for (c=0; c<sz; c++) if (!name##_CHECK_IID(c)) { (index)=c; return 1; } \
return 0;
#define index(s, c)
Definition: various.h:29
const GLubyte * c
Definition: glext.h:8905
Definition: name.c:39

Definition at line 223 of file rpcproxy.h.

◆ IID_BS_LOOKUP_SETUP

#define IID_BS_LOOKUP_SETUP    int c;

Definition at line 219 of file rpcproxy.h.

◆ IID_GENERIC_CHECK_IID

#define IID_GENERIC_CHECK_IID (   name,
  pIID,
  index 
)    memcmp(pIID, name##_ProxyVtblList[index]->header.piid, sizeof(IID))

Definition at line 211 of file rpcproxy.h.

◆ PROXYFILE_LIST_END

#define PROXYFILE_LIST_END
Value:
NULL \
};

Definition at line 238 of file rpcproxy.h.

◆ PROXYFILE_LIST_START

#define PROXYFILE_LIST_START
Value:
{

Definition at line 231 of file rpcproxy.h.

◆ REFERENCE_PROXY_FILE

#define REFERENCE_PROXY_FILE (   proxy)     & proxy##_ProxyFileInfo

Definition at line 235 of file rpcproxy.h.

◆ REGISTER_PROXY_DLL_ROUTINES

#define REGISTER_PROXY_DLL_ROUTINES (   pfl,
  factory_clsid 
)
Value:
HINSTANCE hProxyDll = NULL; \
\
{ \
{ \
DisableThreadLibraryCalls(hinstDLL); \
hProxyDll = hinstDLL; \
} \
return TRUE; \
} \
\
{ \
WINE_DO_REGISTER_DLL( (pfl), (factory_clsid) ); \
} \
\
{ \
WINE_DO_UNREGISTER_DLL( (pfl), (factory_clsid) ); \
}
static DWORD const fdwReason
#define TRUE
Definition: types.h:120
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static IN DWORD IN LPVOID lpvReserved
#define DLLMAIN_ENTRY
Definition: rpcproxy.h:275
#define DLLUNREGISTERSERVER_ENTRY
Definition: rpcproxy.h:274
#define DLLREGISTERSERVER_ENTRY
Definition: rpcproxy.h:273

Definition at line 320 of file rpcproxy.h.

◆ STUB_FORWARDING_FUNCTION

#define STUB_FORWARDING_FUNCTION   NdrStubForwardingFunction

Definition at line 121 of file rpcproxy.h.

◆ WINE_DO_REGISTER_DLL

#define WINE_DO_REGISTER_DLL (   pfl,
  clsid 
)    return NdrDllRegisterProxy( hProxyDll, (pfl), (clsid) )

Definition at line 289 of file rpcproxy.h.

◆ WINE_DO_UNREGISTER_DLL

#define WINE_DO_UNREGISTER_DLL (   pfl,
  clsid 
)    return NdrDllUnregisterProxy( hProxyDll, (pfl), (clsid) )

Definition at line 290 of file rpcproxy.h.

Typedef Documentation

◆ CInterfaceProxyHeader

◆ CInterfaceProxyVtbl

◆ CInterfaceStubHeader

◆ CInterfaceStubVtbl

◆ CStdPSFactoryBuffer

◆ CStdStubBuffer

◆ ExtendedProxyFileInfo

Definition at line 60 of file rpcproxy.h.

◆ IIDLookupRtn

typedef int __stdcall IIDLookupRtn(const IID *pIID, int *pIndex)

Definition at line 42 of file rpcproxy.h.

◆ PCInterfaceName

Definition at line 41 of file rpcproxy.h.

◆ PCInterfaceProxyVtblList

Definition at line 40 of file rpcproxy.h.

◆ PCInterfaceStubVtblList

Definition at line 39 of file rpcproxy.h.

◆ PIIDLookup

Definition at line 43 of file rpcproxy.h.

◆ ProxyFileInfo

◆ PRPC_STUB_FUNCTION

typedef void(__RPC_STUB * PRPC_STUB_FUNCTION) (IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *pdwStubPhase)

Definition at line 83 of file rpcproxy.h.

Function Documentation

◆ __wine_register_resources()

HRESULT __cdecl __wine_register_resources ( HMODULE  module)

Definition at line 112 of file register.c.

113{
114 struct reg_info info;
115
116 info.registrar = NULL;
117 info.do_register = TRUE;
118 info.result = S_OK;
120 if (info.registrar) IRegistrar_Release( info.registrar );
121 return info.result;
122}
BOOL WINAPI EnumResourceNamesW(HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpfun, LONG_PTR lparam)
Definition: res.c:358
#define S_OK
Definition: intsafe.h:52
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
static BOOL CALLBACK register_resource(HMODULE module, LPCWSTR type, LPWSTR name, LONG_PTR arg)
Definition: register.c:84
static const WCHAR regtypeW[]
Definition: register.c:45

◆ __wine_unregister_resources()

HRESULT __cdecl __wine_unregister_resources ( HMODULE  module)

Definition at line 124 of file register.c.

125{
126 struct reg_info info;
127
128 info.registrar = NULL;
129 info.do_register = FALSE;
130 info.result = S_OK;
132 if (info.registrar) IRegistrar_Release( info.registrar );
133 return info.result;
134}
#define FALSE
Definition: types.h:117

◆ CStdStubBuffer2_Release()

ULONG STDMETHODCALLTYPE CStdStubBuffer2_Release ( IRpcStubBuffer This)

◆ CStdStubBuffer_AddRef()

RPCRTAPI ULONG WINAPI CStdStubBuffer_AddRef ( IRpcStubBuffer This)

◆ CStdStubBuffer_Connect()

RPCRTAPI HRESULT WINAPI CStdStubBuffer_Connect ( IRpcStubBuffer This,
IUnknown pUnkServer 
)

◆ CStdStubBuffer_CountRefs()

RPCRTAPI ULONG WINAPI CStdStubBuffer_CountRefs ( IRpcStubBuffer This)

◆ CStdStubBuffer_DebugServerQueryInterface()

RPCRTAPI HRESULT WINAPI CStdStubBuffer_DebugServerQueryInterface ( IRpcStubBuffer This,
void **  ppv 
)

◆ CStdStubBuffer_DebugServerRelease()

RPCRTAPI void WINAPI CStdStubBuffer_DebugServerRelease ( IRpcStubBuffer This,
void pv 
)

◆ CStdStubBuffer_Disconnect()

RPCRTAPI void WINAPI CStdStubBuffer_Disconnect ( IRpcStubBuffer This)

◆ CStdStubBuffer_Invoke()

RPCRTAPI HRESULT WINAPI CStdStubBuffer_Invoke ( IRpcStubBuffer This,
RPCOLEMESSAGE *  pRpcMsg,
IRpcChannelBuffer pRpcChannelBuffer 
)

◆ CStdStubBuffer_IsIIDSupported()

RPCRTAPI IRpcStubBuffer *WINAPI CStdStubBuffer_IsIIDSupported ( IRpcStubBuffer This,
REFIID  riid 
)

◆ CStdStubBuffer_QueryInterface()

RPCRTAPI HRESULT WINAPI CStdStubBuffer_QueryInterface ( IRpcStubBuffer This,
REFIID  riid,
void **  ppvObject 
)

◆ CStdStubBuffer_Release()

ULONG STDMETHODCALLTYPE CStdStubBuffer_Release ( IRpcStubBuffer This)

◆ NdrCStdStubBuffer2_Release()

RPCRTAPI ULONG WINAPI NdrCStdStubBuffer2_Release ( IRpcStubBuffer This,
IPSFactoryBuffer pPSF 
)

◆ NdrCStdStubBuffer_Release()

RPCRTAPI ULONG WINAPI NdrCStdStubBuffer_Release ( IRpcStubBuffer This,
IPSFactoryBuffer pPSF 
)

◆ NdrDllCanUnloadNow()

RPCRTAPI HRESULT RPC_ENTRY NdrDllCanUnloadNow ( CStdPSFactoryBuffer pPSFactoryBuffer)

Definition at line 209 of file cpsf.c.

210{
211 return pPSFactoryBuffer->RefCount != 0 ? S_FALSE : S_OK;
212}
#define S_FALSE
Definition: winerror.h:3451

◆ NdrDllGetClassObject()

RPCRTAPI HRESULT RPC_ENTRY NdrDllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
void **  ppv,
const ProxyFileInfo **  pProxyFileList,
const CLSID pclsid,
CStdPSFactoryBuffer pPSFactoryBuffer 
)

◆ NdrDllRegisterProxy()

RPCRTAPI HRESULT RPC_ENTRY NdrDllRegisterProxy ( HMODULE  hDll,
const ProxyFileInfo **  pProxyFileList,
const CLSID pclsid 
)

Definition at line 218 of file cpsf.c.

221{
222 WCHAR clsid[39], keyname[50], module[MAX_PATH];
223 HKEY key, subkey;
224 DWORD len;
225
226 TRACE("(%p,%p,%s)\n", hDll, pProxyFileList, debugstr_guid(pclsid));
227
228 if (!hDll) return E_HANDLE;
229 if (!*pProxyFileList) return E_NOINTERFACE;
230
231 if (pclsid)
232 format_clsid( clsid, pclsid );
233 else if ((*pProxyFileList)->TableSize > 0)
234 format_clsid( clsid,(*pProxyFileList)->pStubVtblList[0]->header.piid);
235 else
236 return E_NOINTERFACE;
237
238 /* register interfaces to point to clsid */
239 while (*pProxyFileList) {
240 unsigned u;
241 for (u=0; u<(*pProxyFileList)->TableSize; u++) {
242 CInterfaceStubVtbl *proxy = (*pProxyFileList)->pStubVtblList[u];
243 PCInterfaceName name = (*pProxyFileList)->pNamesArray[u];
244
245 TRACE("registering %s %s => %s\n",
247
248 lstrcpyW( keyname, L"Interface\\" );
249 format_clsid( keyname + lstrlenW(keyname), proxy->header.piid );
251 WCHAR num[10];
252 if (name)
253 RegSetValueExA(key, NULL, 0, REG_SZ, (const BYTE *)name, strlen(name)+1);
254 RegSetValueW( key, L"ProxyStubClsid32", REG_SZ, clsid, 0 );
255 swprintf(num, L"%u", proxy->header.DispatchTableCount);
256 RegSetValueW( key, L"NumMethods", REG_SZ, num, 0 );
258 }
259 }
260 pProxyFileList++;
261 }
262
263 /* register clsid to point to module */
264 lstrcpyW( keyname, L"CLSID\\" );
265 lstrcatW( keyname, clsid );
267 if (len && len < sizeof(module)) {
268 TRACE("registering CLSID %s => %s\n", debugstr_w(clsid), debugstr_w(module));
270 RegSetValueExW(key, NULL, 0, REG_SZ, (const BYTE *)L"PSFactoryBuffer", sizeof(L"PSFactoryBuffer"));
271 if (RegCreateKeyW(key, L"InProcServer32", &subkey) == ERROR_SUCCESS) {
272 RegSetValueExW(subkey, NULL, 0, REG_SZ, (LPBYTE)module, (lstrlenW(module)+1)*sizeof(WCHAR));
273 RegSetValueExW(subkey, L"ThreadingModel", 0, REG_SZ, (const BYTE *)L"Both", sizeof(L"Both"));
274 RegCloseKey(subkey);
275 }
277 }
278 }
279
280 return S_OK;
281}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define ARRAY_SIZE(A)
Definition: main.h:20
#define RegCloseKey(hKey)
Definition: registry.h:49
static void format_clsid(WCHAR *buffer, const CLSID *clsid)
Definition: cpsf.c:42
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
Definition: reg.c:4799
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
LONG WINAPI RegSetValueW(HKEY hKeyOriginal, LPCWSTR lpSubKey, DWORD dwType, LPCWSTR lpData, DWORD cbData)
Definition: reg.c:5000
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1201
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
#define swprintf
Definition: precomp.h:40
#define L(x)
Definition: resources.c:13
int proxy
Definition: main.c:67
GLuint GLuint num
Definition: glext.h:9618
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
#define REG_SZ
Definition: layer.c:22
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
const CLSID * clsid
Definition: msctf.cpp:50
const char * PCInterfaceName
Definition: rpcproxy.h:41
#define TRACE(s)
Definition: solgame.cpp:4
Definition: copy.c:22
unsigned char * LPBYTE
Definition: typedefs.h:53
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_HANDLE
Definition: winerror.h:4117
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193

Referenced by test_NdrDllRegisterProxy().

◆ NdrDllUnregisterProxy()

RPCRTAPI HRESULT RPC_ENTRY NdrDllUnregisterProxy ( HMODULE  hDll,
const ProxyFileInfo **  pProxyFileList,
const CLSID pclsid 
)

Definition at line 286 of file cpsf.c.

289{
290 WCHAR keyname[50];
291 WCHAR clsid[39];
292
293 TRACE("(%p,%p,%s)\n", hDll, pProxyFileList, debugstr_guid(pclsid));
294 if (pclsid)
295 format_clsid( clsid, pclsid );
296 else if ((*pProxyFileList)->TableSize > 0)
297 format_clsid( clsid,(*pProxyFileList)->pStubVtblList[0]->header.piid);
298 else
299 return E_NOINTERFACE;
300
301 /* unregister interfaces */
302 while (*pProxyFileList) {
303 unsigned u;
304 for (u=0; u<(*pProxyFileList)->TableSize; u++) {
305 CInterfaceStubVtbl *proxy = (*pProxyFileList)->pStubVtblList[u];
306 PCInterfaceName name = (*pProxyFileList)->pNamesArray[u];
307
308 TRACE("unregistering %s %s\n", debugstr_a(name), debugstr_guid(proxy->header.piid));
309
310 lstrcpyW( keyname, L"Interface\\" );
311 format_clsid( keyname + lstrlenW(keyname), proxy->header.piid );
313 }
314 pProxyFileList++;
315 }
316
317 /* unregister clsid */
318 lstrcpyW( keyname, L"CLSID\\" );
319 lstrcatW( keyname, clsid );
321
322 return S_OK;
323}
LSTATUS WINAPI RegDeleteTreeW(_In_ HKEY, _In_opt_ LPCWSTR)

Referenced by test_NdrDllRegisterProxy().

◆ NdrProxyErrorHandler()

RPCRTAPI HRESULT RPC_ENTRY NdrProxyErrorHandler ( DWORD  dwExceptionCode)

Definition at line 366 of file cproxy.c.

367{
368 WARN("(0x%08lx): a proxy call failed\n", dwExceptionCode);
369
370 if (FAILED(dwExceptionCode))
371 return dwExceptionCode;
372 else
373 return HRESULT_FROM_WIN32(dwExceptionCode);
374}
#define WARN(fmt,...)
Definition: precomp.h:61
#define FAILED(hr)
Definition: intsafe.h:51
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210

Referenced by NdrpClientCall2().

◆ NdrProxyFreeBuffer()

RPCRTAPI void RPC_ENTRY NdrProxyFreeBuffer ( void This,
PMIDL_STUB_MESSAGE  pStubMsg 
)

Definition at line 348 of file cproxy.c.

350{
351 TRACE("(%p,%p)\n", This, pStubMsg);
352
353 if (pStubMsg->fBufferValid)
354 {
355 IRpcChannelBuffer_FreeBuffer(pStubMsg->pRpcChannelBuffer,
356 (RPCOLEMESSAGE*)pStubMsg->RpcMsg);
357 pStubMsg->fBufferValid = FALSE;
358 }
359 IRpcChannelBuffer_Release(pStubMsg->pRpcChannelBuffer);
360 pStubMsg->pRpcChannelBuffer = NULL;
361}
unsigned int fBufferValid
Definition: rpcndr.h:226
struct IRpcChannelBuffer * pRpcChannelBuffer
Definition: rpcndr.h:236
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:185

Referenced by ndr_client_call_finally(), and test_ChannelBufferRefCount().

◆ NdrProxyGetBuffer()

RPCRTAPI void RPC_ENTRY NdrProxyGetBuffer ( void This,
PMIDL_STUB_MESSAGE  pStubMsg 
)

Definition at line 286 of file cproxy.c.

288{
289 HRESULT hr;
290 const IID *riid = NULL;
291
292 TRACE("(%p,%p)\n", This, pStubMsg);
293 pStubMsg->RpcMsg->BufferLength = pStubMsg->BufferLength;
294 pStubMsg->dwStubPhase = PROXY_GETBUFFER;
296 hr = IRpcChannelBuffer_GetBuffer(pStubMsg->pRpcChannelBuffer,
297 (RPCOLEMESSAGE*)pStubMsg->RpcMsg,
298 riid);
299 if (FAILED(hr))
300 {
302 return;
303 }
304 pStubMsg->fBufferValid = TRUE;
305 pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
306 pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
307 pStubMsg->Buffer = pStubMsg->BufferStart;
308 pStubMsg->dwStubPhase = PROXY_MARSHAL;
309}
static void StdProxy_GetIID(LPVOID iface, const IID **ppiid)
Definition: cproxy.c:231
@ PROXY_GETBUFFER
Definition: rpcndr.h:492
@ PROXY_MARSHAL
Definition: rpcndr.h:493
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:213
HRESULT hr
Definition: shlfolder.c:183
DWORD dwStubPhase
Definition: rpcndr.h:242
unsigned char * Buffer
Definition: rpcndr.h:186
ULONG BufferLength
Definition: rpcndr.h:190
unsigned char * BufferEnd
Definition: rpcndr.h:188
unsigned char * BufferStart
Definition: rpcndr.h:187
unsigned int BufferLength
Definition: rpcdcep.h:41
void * Buffer
Definition: rpcdcep.h:40

Referenced by ndr_client_call().

◆ NdrProxyInitialize()

RPCRTAPI void RPC_ENTRY NdrProxyInitialize ( void This,
PRPC_MESSAGE  pRpcMsg,
PMIDL_STUB_MESSAGE  pStubMsg,
PMIDL_STUB_DESC  pStubDescriptor,
unsigned int  ProcNum 
)

Definition at line 266 of file cproxy.c.

271{
272 TRACE("(%p,%p,%p,%p,%d)\n", This, pRpcMsg, pStubMsg, pStubDescriptor, ProcNum);
273 NdrClientInitializeNew(pRpcMsg, pStubMsg, pStubDescriptor, ProcNum);
275 if (!pStubMsg->pRpcChannelBuffer)
277 IRpcChannelBuffer_GetDestCtx(pStubMsg->pRpcChannelBuffer,
278 &pStubMsg->dwDestContext,
279 &pStubMsg->pvDestContext);
280 TRACE("channel=%p\n", pStubMsg->pRpcChannelBuffer);
281}
static void StdProxy_GetChannel(LPVOID iface, LPRPCCHANNELBUFFER *ppChannel)
Definition: cproxy.c:219
void WINAPI NdrClientInitializeNew(PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum)
void * pvDestContext
Definition: rpcndr.h:233
DWORD dwDestContext
Definition: rpcndr.h:232
#define CO_E_OBJNOTCONNECTED
Definition: winerror.h:3929

Referenced by ndr_client_call(), and test_ChannelBufferRefCount().

◆ NdrProxySendReceive()

RPCRTAPI void RPC_ENTRY NdrProxySendReceive ( void This,
PMIDL_STUB_MESSAGE  pStubMsg 
)

Definition at line 314 of file cproxy.c.

316{
317 ULONG Status = 0;
318 HRESULT hr;
319
320 TRACE("(%p,%p)\n", This, pStubMsg);
321
322 if (!pStubMsg->pRpcChannelBuffer)
323 {
324 WARN("Trying to use disconnected proxy %p\n", This);
326 }
327
328 pStubMsg->dwStubPhase = PROXY_SENDRECEIVE;
329 /* avoid sending uninitialised parts of the buffer on the wire */
330 pStubMsg->RpcMsg->BufferLength = pStubMsg->Buffer - (unsigned char *)pStubMsg->RpcMsg->Buffer;
331 hr = IRpcChannelBuffer_SendReceive(pStubMsg->pRpcChannelBuffer,
332 (RPCOLEMESSAGE*)pStubMsg->RpcMsg,
333 &Status);
334 pStubMsg->dwStubPhase = PROXY_UNMARSHAL;
335 pStubMsg->BufferLength = pStubMsg->RpcMsg->BufferLength;
336 pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
337 pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
338 pStubMsg->Buffer = pStubMsg->BufferStart;
339
340 /* raise exception if call failed */
341 if (hr == RPC_S_CALL_FAILED) RpcRaiseException(*(DWORD*)pStubMsg->Buffer);
342 else if (FAILED(hr)) RpcRaiseException(hr);
343}
Status
Definition: gdiplustypes.h:25
@ PROXY_UNMARSHAL
Definition: rpcndr.h:495
@ PROXY_SENDRECEIVE
Definition: rpcndr.h:494
#define RPC_S_CALL_FAILED
Definition: winerror.h:1393
#define RPC_E_DISCONNECTED
Definition: winerror.h:3556

Referenced by ndr_client_call().

◆ NdrStubErrorHandler()

RPCRTAPI HRESULT RPC_ENTRY NdrStubErrorHandler ( DWORD  dwExceptionCode)

◆ NdrStubForwardingFunction()

void __RPC_STUB NdrStubForwardingFunction ( IRpcStubBuffer This,
IRpcChannelBuffer pChannel,
PRPC_MESSAGE  pMsg,
DWORD pdwStubPhase 
)

Definition at line 421 of file cstub.c.

423{
424 /* Note pMsg is passed intact since RPCOLEMESSAGE is basically a RPC_MESSAGE. */
425
427 HRESULT r = IRpcStubBuffer_Invoke(This->base_stub, (RPCOLEMESSAGE*)pMsg, pChannel);
429 return;
430}
static cstdstubbuffer_delegating_t * impl_from_delegating(IRpcStubBuffer *iface)
Definition: cstub.c:54
GLdouble GLdouble GLdouble r
Definition: gl.h:2055

Referenced by CreateStubFromTypeInfo(), and test_NdrStubForwardingFunction().

◆ NdrStubGetBuffer()

RPCRTAPI void RPC_ENTRY NdrStubGetBuffer ( IRpcStubBuffer This,
IRpcChannelBuffer pRpcChannelBuffer,
PMIDL_STUB_MESSAGE  pStubMsg 
)

◆ NdrStubInitialize()

RPCRTAPI void RPC_ENTRY NdrStubInitialize ( PRPC_MESSAGE  pRpcMsg,
PMIDL_STUB_MESSAGE  pStubMsg,
PMIDL_STUB_DESC  pStubDescriptor,
IRpcChannelBuffer pRpcChannelBuffer 
)

◆ NdrStubInitializePartial()

RPCRTAPI void RPC_ENTRY NdrStubInitializePartial ( PRPC_MESSAGE  pRpcMsg,
PMIDL_STUB_MESSAGE  pStubMsg,
PMIDL_STUB_DESC  pStubDescriptor,
IRpcChannelBuffer pRpcChannelBuffer,
ULONG  RequestedBufferSize 
)