ReactOS 0.4.16-dev-109-gf4cb10f
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__   ( 399 )
 
#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 DECLSPEC_HIDDEN;
 
#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

ULONG STDMETHODCALLTYPE CStdStubBuffer2_Release (IRpcStubBuffer *This) DECLSPEC_HIDDEN
 
ULONG STDMETHODCALLTYPE NdrCStdStubBuffer2_Release (IRpcStubBuffer *This, IPSFactoryBuffer *pPSF)
 
HRESULT WINAPI CStdStubBuffer_QueryInterface (IRpcStubBuffer *This, REFIID riid, void **ppvObject)
 
ULONG WINAPI CStdStubBuffer_AddRef (IRpcStubBuffer *This)
 
ULONG WINAPI CStdStubBuffer_Release (IRpcStubBuffer *This) DECLSPEC_HIDDEN
 
ULONG WINAPI NdrCStdStubBuffer_Release (IRpcStubBuffer *This, IPSFactoryBuffer *pPSF)
 
HRESULT WINAPI CStdStubBuffer_Connect (IRpcStubBuffer *This, IUnknown *pUnkServer)
 
void WINAPI CStdStubBuffer_Disconnect (IRpcStubBuffer *This)
 
HRESULT WINAPI CStdStubBuffer_Invoke (IRpcStubBuffer *This, RPCOLEMESSAGE *pRpcMsg, IRpcChannelBuffer *pRpcChannelBuffer)
 
IRpcStubBuffer *WINAPI CStdStubBuffer_IsIIDSupported (IRpcStubBuffer *This, REFIID riid)
 
ULONG WINAPI CStdStubBuffer_CountRefs (IRpcStubBuffer *This)
 
HRESULT WINAPI CStdStubBuffer_DebugServerQueryInterface (IRpcStubBuffer *This, void **ppv)
 
void WINAPI CStdStubBuffer_DebugServerRelease (IRpcStubBuffer *This, void *pv)
 
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 __wine_register_resources (HMODULE module) DECLSPEC_HIDDEN
 
HRESULT __wine_unregister_resources (HMODULE module) DECLSPEC_HIDDEN
 

Macro Definition Documentation

◆ __midl_proxy

#define __midl_proxy

Definition at line 27 of file rpcproxy.h.

◆ __RPCPROXY_H_VERSION__

#define __RPCPROXY_H_VERSION__   ( 399 )

Definition at line 21 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 71 of file rpcproxy.h.

◆ CLSID_PSFACTORYBUFFER

#define CLSID_PSFACTORYBUFFER

Definition at line 264 of file rpcproxy.h.

◆ CSTDSTUBBUFFER2RELEASE

#define CSTDSTUBBUFFER2RELEASE (   pFactory)

Definition at line 218 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 131 of file rpcproxy.h.

◆ CStdStubBuffer_METHODS

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

Definition at line 157 of file rpcproxy.h.

◆ CSTDSTUBBUFFERRELEASE

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

Definition at line 209 of file rpcproxy.h.

◆ DLLCANUNLOADNOW

#define DLLCANUNLOADNOW (   factory)
Value:
{ \
}
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
RPCRTAPI HRESULT RPC_ENTRY NdrDllCanUnloadNow(CStdPSFactoryBuffer *pPSFactoryBuffer)
Definition: cpsf.c:212
#define DLLCANUNLOADNOW_ENTRY
Definition: rpcproxy.h:288
Definition: main.c:439

Definition at line 319 of file rpcproxy.h.

◆ DLLCANUNLOADNOW_ENTRY

#define DLLCANUNLOADNOW_ENTRY   DllCanUnloadNow

Definition at line 288 of file rpcproxy.h.

◆ DLLDATA_GETPROXYDLLINFO

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

Definition at line 300 of file rpcproxy.h.

◆ DLLDATA_ROUTINES

#define DLLDATA_ROUTINES (   pfl,
  factory_clsid 
)
Value:
CLSID_PSFACTORYBUFFER \
CStdPSFactoryBuffer DECLSPEC_HIDDEN 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 360 of file rpcproxy.h.

◆ DLLGETCLASSOBJECT_ENTRY

#define DLLGETCLASSOBJECT_ENTRY   DllGetClassObject

Definition at line 287 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:287

Definition at line 310 of file rpcproxy.h.

◆ DLLMAIN_ENTRY

#define DLLMAIN_ENTRY   DllMain

Definition at line 286 of file rpcproxy.h.

◆ DLLREGISTERSERVER_ENTRY

#define DLLREGISTERSERVER_ENTRY   DllRegisterServer

Definition at line 284 of file rpcproxy.h.

◆ DLLREGISTRY_ROUTINES

#define DLLREGISTRY_ROUTINES (   pfl,
  factory_clsid 
)

Definition at line 357 of file rpcproxy.h.

◆ DLLUNREGISTERSERVER_ENTRY

#define DLLUNREGISTERSERVER_ENTRY   DllUnregisterServer

Definition at line 285 of file rpcproxy.h.

◆ EXTERN_PROXY_FILE

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

Definition at line 238 of file rpcproxy.h.

◆ GET_DLL_CLSID

#define GET_DLL_CLSID
Value:
const ProxyFileInfo * aProxyFileList
const IID * piid
Definition: rpcproxy.h:96
CInterfaceStubHeader header
Definition: rpcproxy.h:104
const PCInterfaceStubVtblList * pStubVtblList
Definition: rpcproxy.h:49

Definition at line 269 of file rpcproxy.h.

◆ IID_BS_LOOKUP_INITIAL_TEST

#define IID_BS_LOOKUP_INITIAL_TEST (   name,
  sz,
  split 
)

Definition at line 231 of file rpcproxy.h.

◆ IID_BS_LOOKUP_NEXT_TEST

#define IID_BS_LOOKUP_NEXT_TEST (   name,
  split 
)

Definition at line 232 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 233 of file rpcproxy.h.

◆ IID_BS_LOOKUP_SETUP

#define IID_BS_LOOKUP_SETUP    int c;

Definition at line 229 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 221 of file rpcproxy.h.

◆ PROXYFILE_LIST_END

#define PROXYFILE_LIST_END
Value:
NULL \
};

Definition at line 248 of file rpcproxy.h.

◆ PROXYFILE_LIST_START

#define PROXYFILE_LIST_START
Value:

Definition at line 241 of file rpcproxy.h.

◆ REFERENCE_PROXY_FILE

#define REFERENCE_PROXY_FILE (   proxy)     & proxy##_ProxyFileInfo

Definition at line 245 of file rpcproxy.h.

◆ REGISTER_PROXY_DLL_ROUTINES

#define REGISTER_PROXY_DLL_ROUTINES (   pfl,
  factory_clsid 
)
Value:
\
BOOL WINAPI DLLMAIN_ENTRY(HINSTANCE hinstDLL, DWORD fdwReason, \
{ \
if (fdwReason == DLL_PROCESS_ATTACH) \
{ \
DisableThreadLibraryCalls(hinstDLL); \
hProxyDll = hinstDLL; \
} \
return TRUE; \
} \
\
{ \
WINE_DO_REGISTER_DLL( (pfl), (factory_clsid) ); \
} \
\
{ \
WINE_DO_UNREGISTER_DLL( (pfl), (factory_clsid) ); \
}
#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:286
#define DLLUNREGISTERSERVER_ENTRY
Definition: rpcproxy.h:285
#define DLLREGISTERSERVER_ENTRY
Definition: rpcproxy.h:284

Definition at line 326 of file rpcproxy.h.

◆ STUB_FORWARDING_FUNCTION

#define STUB_FORWARDING_FUNCTION   NdrStubForwardingFunction

Definition at line 126 of file rpcproxy.h.

◆ WINE_DO_REGISTER_DLL

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

Definition at line 295 of file rpcproxy.h.

◆ WINE_DO_UNREGISTER_DLL

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

Definition at line 296 of file rpcproxy.h.

Typedef Documentation

◆ CInterfaceProxyHeader

◆ CInterfaceProxyVtbl

◆ CInterfaceStubHeader

◆ CInterfaceStubVtbl

◆ CStdPSFactoryBuffer

◆ CStdStubBuffer

◆ ExtendedProxyFileInfo

Definition at line 61 of file rpcproxy.h.

◆ IIDLookupRtn

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

Definition at line 43 of file rpcproxy.h.

◆ PCInterfaceName

Definition at line 42 of file rpcproxy.h.

◆ PCInterfaceProxyVtblList

Definition at line 41 of file rpcproxy.h.

◆ PCInterfaceStubVtblList

Definition at line 40 of file rpcproxy.h.

◆ PIIDLookup

Definition at line 44 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 88 of file rpcproxy.h.

Function Documentation

◆ __wine_register_resources()

HRESULT __wine_register_resources ( HMODULE  module)

Definition at line 98 of file register.c.

99{
100 struct reg_info info;
101
102 info.registrar = NULL;
103 info.do_register = TRUE;
104 info.result = S_OK;
106 if (info.registrar) IRegistrar_Release( info.registrar );
107 return info.result;
108}
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:70
static const WCHAR regtypeW[]
Definition: register.c:34

Referenced by DllRegisterServer(), and RegisterTypeLibraries().

◆ __wine_unregister_resources()

HRESULT __wine_unregister_resources ( HMODULE  module)

Definition at line 110 of file register.c.

111{
112 struct reg_info info;
113
114 info.registrar = NULL;
115 info.do_register = FALSE;
116 info.result = S_OK;
118 if (info.registrar) IRegistrar_Release( info.registrar );
119 return info.result;
120}
#define FALSE
Definition: types.h:117

Referenced by DllUnregisterServer().

◆ CStdStubBuffer2_Release()

ULONG STDMETHODCALLTYPE CStdStubBuffer2_Release ( IRpcStubBuffer This)

◆ CStdStubBuffer_AddRef()

ULONG WINAPI CStdStubBuffer_AddRef ( IRpcStubBuffer This)

◆ CStdStubBuffer_Connect()

HRESULT WINAPI CStdStubBuffer_Connect ( IRpcStubBuffer This,
IUnknown pUnkServer 
)

◆ CStdStubBuffer_CountRefs()

ULONG WINAPI CStdStubBuffer_CountRefs ( IRpcStubBuffer This)

◆ CStdStubBuffer_DebugServerQueryInterface()

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

◆ CStdStubBuffer_DebugServerRelease()

void WINAPI CStdStubBuffer_DebugServerRelease ( IRpcStubBuffer This,
void pv 
)

◆ CStdStubBuffer_Disconnect()

void WINAPI CStdStubBuffer_Disconnect ( IRpcStubBuffer This)

◆ CStdStubBuffer_Invoke()

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

◆ CStdStubBuffer_IsIIDSupported()

IRpcStubBuffer *WINAPI CStdStubBuffer_IsIIDSupported ( IRpcStubBuffer This,
REFIID  riid 
)

◆ CStdStubBuffer_QueryInterface()

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

◆ CStdStubBuffer_Release()

ULONG WINAPI CStdStubBuffer_Release ( IRpcStubBuffer This)

◆ NdrCStdStubBuffer2_Release()

ULONG STDMETHODCALLTYPE NdrCStdStubBuffer2_Release ( IRpcStubBuffer This,
IPSFactoryBuffer pPSF 
)

◆ NdrCStdStubBuffer_Release()

ULONG WINAPI NdrCStdStubBuffer_Release ( IRpcStubBuffer This,
IPSFactoryBuffer pPSF 
)

◆ NdrDllCanUnloadNow()

RPCRTAPI HRESULT RPC_ENTRY NdrDllCanUnloadNow ( CStdPSFactoryBuffer pPSFactoryBuffer)

Definition at line 212 of file cpsf.c.

213{
214 return pPSFactoryBuffer->RefCount != 0 ? S_FALSE : S_OK;
215}
#define S_FALSE
Definition: winerror.h:2357

◆ 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 221 of file cpsf.c.

224{
225 static const WCHAR bothW[] = {'B','o','t','h',0};
226 static const WCHAR clsidW[] = {'C','L','S','I','D','\\',0};
227 static const WCHAR clsid32W[] = {'P','r','o','x','y','S','t','u','b','C','l','s','i','d','3','2',0};
228 static const WCHAR interfaceW[] = {'I','n','t','e','r','f','a','c','e','\\',0};
229 static const WCHAR psfactoryW[] = {'P','S','F','a','c','t','o','r','y','B','u','f','f','e','r',0};
230 static const WCHAR numformatW[] = {'%','u',0};
231 static const WCHAR nummethodsW[] = {'N','u','m','M','e','t','h','o','d','s',0};
232 static const WCHAR inprocserverW[] = {'I','n','P','r','o','c','S','e','r','v','e','r','3','2',0};
233 static const WCHAR threadingmodelW[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
234 WCHAR clsid[39], keyname[50], module[MAX_PATH];
235 HKEY key, subkey;
236 DWORD len;
237
238 TRACE("(%p,%p,%s)\n", hDll, pProxyFileList, debugstr_guid(pclsid));
239
240 if (!hDll) return E_HANDLE;
241 if (!*pProxyFileList) return E_NOINTERFACE;
242
243 if (pclsid)
244 format_clsid( clsid, pclsid );
245 else if ((*pProxyFileList)->TableSize > 0)
246 format_clsid( clsid,(*pProxyFileList)->pStubVtblList[0]->header.piid);
247 else
248 return E_NOINTERFACE;
249
250 /* register interfaces to point to clsid */
251 while (*pProxyFileList) {
252 unsigned u;
253 for (u=0; u<(*pProxyFileList)->TableSize; u++) {
254 CInterfaceStubVtbl *proxy = (*pProxyFileList)->pStubVtblList[u];
255 PCInterfaceName name = (*pProxyFileList)->pNamesArray[u];
256
257 TRACE("registering %s %s => %s\n",
259
260 lstrcpyW( keyname, interfaceW );
261 format_clsid( keyname + lstrlenW(keyname), proxy->header.piid );
263 WCHAR num[10];
264 if (name)
265 RegSetValueExA(key, NULL, 0, REG_SZ, (const BYTE *)name, strlen(name)+1);
266 RegSetValueW( key, clsid32W, REG_SZ, clsid, 0 );
267 swprintf(num, numformatW, proxy->header.DispatchTableCount);
270 }
271 }
272 pProxyFileList++;
273 }
274
275 /* register clsid to point to module */
276 lstrcpyW( keyname, clsidW );
277 lstrcatW( keyname, clsid );
279 if (len && len < sizeof(module)) {
280 TRACE("registering CLSID %s => %s\n", debugstr_w(clsid), debugstr_w(module));
282 RegSetValueExW(key, NULL, 0, REG_SZ, (const BYTE *)psfactoryW, sizeof(psfactoryW));
283 if (RegCreateKeyW(key, inprocserverW, &subkey) == ERROR_SUCCESS) {
284 RegSetValueExW(subkey, NULL, 0, REG_SZ, (LPBYTE)module, (lstrlenW(module)+1)*sizeof(WCHAR));
285 RegSetValueExW(subkey, threadingmodelW, 0, REG_SZ, (const BYTE *)bothW, sizeof(bothW));
286 RegCloseKey(subkey);
287 }
289 }
290 }
291
292 return S_OK;
293}
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
static const WCHAR clsidW[]
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
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
REFCLSID clsid
Definition: msctf.c:82
const char * PCInterfaceName
Definition: rpcproxy.h:42
static const WCHAR threadingmodelW[]
Definition: actctx.c:718
static const WCHAR nummethodsW[]
Definition: actctx.c:737
#define TRACE(s)
Definition: solgame.cpp:4
Definition: copy.c:22
unsigned char * LPBYTE
Definition: typedefs.h:53
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_HANDLE
Definition: winerror.h:2850
#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 298 of file cpsf.c.

301{
302 static const WCHAR clsidW[] = {'C','L','S','I','D','\\',0};
303 static const WCHAR interfaceW[] = {'I','n','t','e','r','f','a','c','e','\\',0};
304 WCHAR keyname[50];
305 WCHAR clsid[39];
306
307 TRACE("(%p,%p,%s)\n", hDll, pProxyFileList, debugstr_guid(pclsid));
308 if (pclsid)
309 format_clsid( clsid, pclsid );
310 else if ((*pProxyFileList)->TableSize > 0)
311 format_clsid( clsid,(*pProxyFileList)->pStubVtblList[0]->header.piid);
312 else
313 return E_NOINTERFACE;
314
315 /* unregister interfaces */
316 while (*pProxyFileList) {
317 unsigned u;
318 for (u=0; u<(*pProxyFileList)->TableSize; u++) {
319 CInterfaceStubVtbl *proxy = (*pProxyFileList)->pStubVtblList[u];
320 PCInterfaceName name = (*pProxyFileList)->pNamesArray[u];
321
322 TRACE("unregistering %s %s\n", debugstr_a(name), debugstr_guid(proxy->header.piid));
323
324 lstrcpyW( keyname, interfaceW );
325 format_clsid( keyname + lstrlenW(keyname), proxy->header.piid );
327 }
328 pProxyFileList++;
329 }
330
331 /* unregister clsid */
332 lstrcpyW( keyname, clsidW );
333 lstrcatW( keyname, clsid );
335
336 return S_OK;
337}
LSTATUS WINAPI RegDeleteTreeW(_In_ HKEY, _In_opt_ LPCWSTR)

Referenced by test_NdrDllRegisterProxy().

◆ NdrProxyErrorHandler()

RPCRTAPI HRESULT RPC_ENTRY NdrProxyErrorHandler ( DWORD  dwExceptionCode)

Definition at line 593 of file cproxy.c.

594{
595 WARN("(0x%08x): a proxy call failed\n", dwExceptionCode);
596
597 if (FAILED(dwExceptionCode))
598 return dwExceptionCode;
599 else
600 return HRESULT_FROM_WIN32(dwExceptionCode);
601}
#define WARN(fmt,...)
Definition: precomp.h:61
#define FAILED(hr)
Definition: intsafe.h:51
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92

Referenced by ndr_client_call().

◆ NdrProxyFreeBuffer()

RPCRTAPI void RPC_ENTRY NdrProxyFreeBuffer ( void This,
PMIDL_STUB_MESSAGE  pStubMsg 
)

Definition at line 577 of file cproxy.c.

579{
580 TRACE("(%p,%p)\n", This, pStubMsg);
581
582 if (pStubMsg->fBufferValid)
583 {
584 IRpcChannelBuffer_FreeBuffer(pStubMsg->pRpcChannelBuffer,
585 (RPCOLEMESSAGE*)pStubMsg->RpcMsg);
586 pStubMsg->fBufferValid = TRUE;
587 }
588}
unsigned int fBufferValid
Definition: rpcndr.h:243
struct IRpcChannelBuffer * pRpcChannelBuffer
Definition: rpcndr.h:253
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202

Referenced by ndr_client_call_finally().

◆ NdrProxyGetBuffer()

RPCRTAPI void RPC_ENTRY NdrProxyGetBuffer ( void This,
PMIDL_STUB_MESSAGE  pStubMsg 
)

Definition at line 515 of file cproxy.c.

517{
518 HRESULT hr;
519 const IID *riid = NULL;
520
521 TRACE("(%p,%p)\n", This, pStubMsg);
522 pStubMsg->RpcMsg->BufferLength = pStubMsg->BufferLength;
523 pStubMsg->dwStubPhase = PROXY_GETBUFFER;
525 hr = IRpcChannelBuffer_GetBuffer(pStubMsg->pRpcChannelBuffer,
526 (RPCOLEMESSAGE*)pStubMsg->RpcMsg,
527 riid);
528 if (FAILED(hr))
529 {
531 return;
532 }
533 pStubMsg->fBufferValid = TRUE;
534 pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
535 pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
536 pStubMsg->Buffer = pStubMsg->BufferStart;
537 pStubMsg->dwStubPhase = PROXY_MARSHAL;
538}
static void StdProxy_GetIID(LPVOID iface, const IID **ppiid)
Definition: cproxy.c:460
@ PROXY_GETBUFFER
Definition: rpcndr.h:456
@ PROXY_MARSHAL
Definition: rpcndr.h:457
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:188
HRESULT hr
Definition: shlfolder.c:183
DWORD dwStubPhase
Definition: rpcndr.h:259
unsigned char * Buffer
Definition: rpcndr.h:203
ULONG BufferLength
Definition: rpcndr.h:207
unsigned char * BufferEnd
Definition: rpcndr.h:205
unsigned char * BufferStart
Definition: rpcndr.h:204
unsigned int BufferLength
Definition: rpcdcep.h:41
void * Buffer
Definition: rpcdcep.h:40

Referenced by do_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 495 of file cproxy.c.

500{
501 TRACE("(%p,%p,%p,%p,%d)\n", This, pRpcMsg, pStubMsg, pStubDescriptor, ProcNum);
502 NdrClientInitializeNew(pRpcMsg, pStubMsg, pStubDescriptor, ProcNum);
504 if (!pStubMsg->pRpcChannelBuffer)
506 IRpcChannelBuffer_GetDestCtx(pStubMsg->pRpcChannelBuffer,
507 &pStubMsg->dwDestContext,
508 &pStubMsg->pvDestContext);
509 TRACE("channel=%p\n", pStubMsg->pRpcChannelBuffer);
510}
static void StdProxy_GetChannel(LPVOID iface, LPRPCCHANNELBUFFER *ppChannel)
Definition: cproxy.c:451
void WINAPI NdrClientInitializeNew(PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum)
void * pvDestContext
Definition: rpcndr.h:250
DWORD dwDestContext
Definition: rpcndr.h:249
#define CO_E_OBJNOTCONNECTED
Definition: winerror.h:2816

Referenced by do_ndr_client_call().

◆ NdrProxySendReceive()

RPCRTAPI void RPC_ENTRY NdrProxySendReceive ( void This,
PMIDL_STUB_MESSAGE  pStubMsg 
)

Definition at line 543 of file cproxy.c.

545{
546 ULONG Status = 0;
547 HRESULT hr;
548
549 TRACE("(%p,%p)\n", This, pStubMsg);
550
551 if (!pStubMsg->pRpcChannelBuffer)
552 {
553 WARN("Trying to use disconnected proxy %p\n", This);
555 }
556
557 pStubMsg->dwStubPhase = PROXY_SENDRECEIVE;
558 /* avoid sending uninitialised parts of the buffer on the wire */
559 pStubMsg->RpcMsg->BufferLength = pStubMsg->Buffer - (unsigned char *)pStubMsg->RpcMsg->Buffer;
560 hr = IRpcChannelBuffer_SendReceive(pStubMsg->pRpcChannelBuffer,
561 (RPCOLEMESSAGE*)pStubMsg->RpcMsg,
562 &Status);
563 pStubMsg->dwStubPhase = PROXY_UNMARSHAL;
564 pStubMsg->BufferLength = pStubMsg->RpcMsg->BufferLength;
565 pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
566 pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
567 pStubMsg->Buffer = pStubMsg->BufferStart;
568
569 /* raise exception if call failed */
570 if (hr == RPC_S_CALL_FAILED) RpcRaiseException(*(DWORD*)pStubMsg->Buffer);
571 else if (FAILED(hr)) RpcRaiseException(hr);
572}
Status
Definition: gdiplustypes.h:25
@ PROXY_UNMARSHAL
Definition: rpcndr.h:459
@ PROXY_SENDRECEIVE
Definition: rpcndr.h:458
#define RPC_S_CALL_FAILED
Definition: winerror.h:1037
#define RPC_E_DISCONNECTED
Definition: winerror.h:2484

Referenced by do_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 624 of file cstub.c.

626{
627 /* Note pMsg is passed intact since RPCOLEMESSAGE is basically a RPC_MESSAGE. */
628
630 HRESULT r = IRpcStubBuffer_Invoke(This->base_stub, (RPCOLEMESSAGE*)pMsg, pChannel);
632 return;
633}
static cstdstubbuffer_delegating_t * impl_from_delegating(IRpcStubBuffer *iface)
Definition: cstub.c:50
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 
)