ReactOS 0.4.15-dev-7906-g1b85a5f
cpsf.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winreg.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "wine/debug.h"
#include "cpsf.h"
Include dependency graph for cpsf.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ole)
 
static void format_clsid (WCHAR *buffer, const CLSID *clsid)
 
static BOOL FindProxyInfo (const ProxyFileInfo **pProxyFileList, REFIID riid, const ProxyFileInfo **pProxyInfo, int *pIndex)
 
static HRESULT WINAPI CStdPSFactory_QueryInterface (LPPSFACTORYBUFFER iface, REFIID riid, LPVOID *obj)
 
static ULONG WINAPI CStdPSFactory_AddRef (LPPSFACTORYBUFFER iface)
 
static ULONG WINAPI CStdPSFactory_Release (LPPSFACTORYBUFFER iface)
 
static HRESULT WINAPI CStdPSFactory_CreateProxy (LPPSFACTORYBUFFER iface, LPUNKNOWN pUnkOuter, REFIID riid, LPRPCPROXYBUFFER *ppProxy, LPVOID *ppv)
 
static HRESULT WINAPI CStdPSFactory_CreateStub (LPPSFACTORYBUFFER iface, REFIID riid, LPUNKNOWN pUnkServer, LPRPCSTUBBUFFER *ppStub)
 
static void init_psfactory (CStdPSFactoryBuffer *psfac, const ProxyFileInfo **file_list)
 
HRESULT WINAPI NdrDllGetClassObject (REFCLSID rclsid, REFIID iid, LPVOID *ppv, const ProxyFileInfo **pProxyFileList, const CLSID *pclsid, CStdPSFactoryBuffer *pPSFactoryBuffer)
 
HRESULT WINAPI NdrDllCanUnloadNow (CStdPSFactoryBuffer *pPSFactoryBuffer)
 
HRESULT WINAPI NdrDllRegisterProxy (HMODULE hDll, const ProxyFileInfo **pProxyFileList, const CLSID *pclsid)
 
HRESULT WINAPI NdrDllUnregisterProxy (HMODULE hDll, const ProxyFileInfo **pProxyFileList, const CLSID *pclsid)
 

Variables

static const IPSFactoryBufferVtbl CStdPSFactory_Vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 25 of file cpsf.c.

Function Documentation

◆ CStdPSFactory_AddRef()

static ULONG WINAPI CStdPSFactory_AddRef ( LPPSFACTORYBUFFER  iface)
static

Definition at line 83 of file cpsf.c.

84{
86 TRACE("(%p)->AddRef()\n",iface);
87 return InterlockedIncrement( &This->RefCount );
88}
#define InterlockedIncrement
Definition: armddk.h:53
#define TRACE(s)
Definition: solgame.cpp:4

◆ CStdPSFactory_CreateProxy()

static HRESULT WINAPI CStdPSFactory_CreateProxy ( LPPSFACTORYBUFFER  iface,
LPUNKNOWN  pUnkOuter,
REFIID  riid,
LPRPCPROXYBUFFER ppProxy,
LPVOID ppv 
)
static

Definition at line 97 of file cpsf.c.

102{
104 const ProxyFileInfo *ProxyInfo;
105 int Index;
106 TRACE("(%p)->CreateProxy(%p,%s,%p,%p)\n",iface,pUnkOuter,
107 debugstr_guid(riid),ppProxy,ppv);
108 if (!FindProxyInfo(This->pProxyFileList,riid,&ProxyInfo,&Index))
109 return E_NOINTERFACE;
110 return StdProxy_Construct(riid, pUnkOuter, ProxyInfo, Index, iface, ppProxy, ppv);
111}
HRESULT StdProxy_Construct(REFIID riid, LPUNKNOWN pUnkOuter, const ProxyFileInfo *ProxyInfo, int Index, LPPSFACTORYBUFFER pPSFactory, LPRPCPROXYBUFFER *ppProxy, LPVOID *ppvObj)
Definition: cproxy.c:305
static BOOL FindProxyInfo(const ProxyFileInfo **pProxyFileList, REFIID riid, const ProxyFileInfo **pProxyInfo, int *pIndex)
Definition: cpsf.c:54
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
_In_ WDFCOLLECTION _In_ ULONG Index
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ CStdPSFactory_CreateStub()

static HRESULT WINAPI CStdPSFactory_CreateStub ( LPPSFACTORYBUFFER  iface,
REFIID  riid,
LPUNKNOWN  pUnkServer,
LPRPCSTUBBUFFER ppStub 
)
static

Definition at line 113 of file cpsf.c.

117{
119 const ProxyFileInfo *ProxyInfo;
120 int Index;
121 TRACE("(%p)->CreateStub(%s,%p,%p)\n",iface,debugstr_guid(riid),
122 pUnkServer,ppStub);
123 if (!FindProxyInfo(This->pProxyFileList,riid,&ProxyInfo,&Index))
124 return E_NOINTERFACE;
125
126 if(ProxyInfo->pDelegatedIIDs && ProxyInfo->pDelegatedIIDs[Index])
127 return CStdStubBuffer_Delegating_Construct(riid, pUnkServer, ProxyInfo->pNamesArray[Index],
128 ProxyInfo->pStubVtblList[Index], ProxyInfo->pDelegatedIIDs[Index],
129 iface, ppStub);
130
131 return CStdStubBuffer_Construct(riid, pUnkServer, ProxyInfo->pNamesArray[Index],
132 ProxyInfo->pStubVtblList[Index], iface, ppStub);
133}
HRESULT CStdStubBuffer_Delegating_Construct(REFIID riid, LPUNKNOWN pUnkServer, PCInterfaceName name, CInterfaceStubVtbl *vtbl, REFIID delegating_iid, LPPSFACTORYBUFFER pPSFactory, LPRPCSTUBBUFFER *ppStub) DECLSPEC_HIDDEN
Definition: cstub.c:340
HRESULT CStdStubBuffer_Construct(REFIID riid, LPUNKNOWN pUnkServer, PCInterfaceName name, CInterfaceStubVtbl *vtbl, LPPSFACTORYBUFFER pPSFactory, LPRPCSTUBBUFFER *ppStub) DECLSPEC_HIDDEN
Definition: cstub.c:55
const IID ** pDelegatedIIDs
Definition: rpcproxy.h:51
const PCInterfaceStubVtblList * pStubVtblList
Definition: rpcproxy.h:49
const PCInterfaceName * pNamesArray
Definition: rpcproxy.h:50

◆ CStdPSFactory_QueryInterface()

static HRESULT WINAPI CStdPSFactory_QueryInterface ( LPPSFACTORYBUFFER  iface,
REFIID  riid,
LPVOID obj 
)
static

Definition at line 68 of file cpsf.c.

71{
73 TRACE("(%p)->QueryInterface(%s,%p)\n",iface,debugstr_guid(riid),obj);
75 IsEqualGUID(&IID_IPSFactoryBuffer,riid)) {
76 *obj = This;
77 InterlockedIncrement( &This->RefCount );
78 return S_OK;
79 }
80 return E_NOINTERFACE;
81}
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:52
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ CStdPSFactory_Release()

static ULONG WINAPI CStdPSFactory_Release ( LPPSFACTORYBUFFER  iface)
static

Definition at line 90 of file cpsf.c.

91{
93 TRACE("(%p)->Release()\n",iface);
94 return InterlockedDecrement( &This->RefCount );
95}
#define InterlockedDecrement
Definition: armddk.h:52

◆ FindProxyInfo()

static BOOL FindProxyInfo ( const ProxyFileInfo **  pProxyFileList,
REFIID  riid,
const ProxyFileInfo **  pProxyInfo,
int pIndex 
)
static

Definition at line 54 of file cpsf.c.

55{
56 while (*pProxyFileList) {
57 if ((*pProxyFileList)->pIIDLookupRtn(riid, pIndex)) {
58 *pProxyInfo = *pProxyFileList;
59 TRACE("found: ProxyInfo %p Index %d\n", *pProxyInfo, *pIndex);
60 return TRUE;
61 }
62 pProxyFileList++;
63 }
64 TRACE("not found\n");
65 return FALSE;
66}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
_Out_ PULONG _Out_ PULONG pIndex
Definition: ndis.h:4565

Referenced by CStdPSFactory_CreateProxy(), CStdPSFactory_CreateStub(), and NdrDllGetClassObject().

◆ format_clsid()

static void format_clsid ( WCHAR buffer,
const CLSID clsid 
)
static

Definition at line 42 of file cpsf.c.

43{
44 static const WCHAR clsid_formatW[] = {'{','%','0','8','X','-','%','0','4','X','-','%','0','4','X','-',
45 '%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X',
46 '%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X','}',0};
47
48 swprintf( buffer, clsid_formatW, clsid->Data1, clsid->Data2, clsid->Data3,
49 clsid->Data4[0], clsid->Data4[1], clsid->Data4[2], clsid->Data4[3],
50 clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7] );
51
52}
#define swprintf
Definition: precomp.h:40
GLuint buffer
Definition: glext.h:5915
REFCLSID clsid
Definition: msctf.c:82
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by NdrDllRegisterProxy(), and NdrDllUnregisterProxy().

◆ init_psfactory()

static void init_psfactory ( CStdPSFactoryBuffer psfac,
const ProxyFileInfo **  file_list 
)
static

Definition at line 145 of file cpsf.c.

146{
147 DWORD i, j, k;
148
149 psfac->lpVtbl = &CStdPSFactory_Vtbl;
150 psfac->RefCount = 0;
151 psfac->pProxyFileList = file_list;
152 for (i = 0; file_list[i]; i++)
153 {
154 const PCInterfaceProxyVtblList *proxies = file_list[i]->pProxyVtblList;
155 const PCInterfaceStubVtblList *stubs = file_list[i]->pStubVtblList;
156
157 for (j = 0; j < file_list[i]->TableSize; j++)
158 {
159 /* FIXME: i think that different vtables should be copied for
160 * async interfaces */
161 void * const *pSrcRpcStubVtbl = (void * const *)&CStdStubBuffer_Vtbl;
162 void **pRpcStubVtbl = (void **)&stubs[j]->Vtbl;
163
164 if (file_list[i]->pDelegatedIIDs && file_list[i]->pDelegatedIIDs[j])
165 {
166 void **vtbl = proxies[j]->Vtbl;
167 if (file_list[i]->TableVersion > 1) vtbl++;
168 fill_delegated_proxy_table( (IUnknownVtbl *)vtbl, stubs[j]->header.DispatchTableCount );
169 pSrcRpcStubVtbl = (void * const *)&CStdStubBuffer_Delegating_Vtbl;
170 }
171
172 for (k = 0; k < sizeof(IRpcStubBufferVtbl)/sizeof(void *); k++)
173 if (!pRpcStubVtbl[k]) pRpcStubVtbl[k] = pSrcRpcStubVtbl[k];
174 }
175 }
176}
static const IPSFactoryBufferVtbl CStdPSFactory_Vtbl
Definition: cpsf.c:135
BOOL fill_delegated_proxy_table(IUnknownVtbl *vtbl, DWORD num) DECLSPEC_HIDDEN
Definition: cstub.c:266
const IRpcStubBufferVtbl CStdStubBuffer_Delegating_Vtbl
Definition: cstub.c:601
const IRpcStubBufferVtbl CStdStubBuffer_Vtbl
Definition: cstub.c:552
unsigned long DWORD
Definition: ntddk_ex.h:95
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
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 const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
int k
Definition: mpi.c:3369
const ProxyFileInfo ** pProxyFileList
Definition: rpcproxy.h:122
const IPSFactoryBufferVtbl * lpVtbl
Definition: rpcproxy.h:120
unsigned short TableSize
Definition: rpcproxy.h:53
const PCInterfaceProxyVtblList * pProxyVtblList
Definition: rpcproxy.h:48

Referenced by NdrDllGetClassObject().

◆ NdrDllCanUnloadNow()

HRESULT WINAPI 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()

HRESULT WINAPI NdrDllGetClassObject ( REFCLSID  rclsid,
REFIID  iid,
LPVOID ppv,
const ProxyFileInfo **  pProxyFileList,
const CLSID pclsid,
CStdPSFactoryBuffer pPSFactoryBuffer 
)

Definition at line 182 of file cpsf.c.

186{
187 TRACE("(%s, %s, %p, %p, %s, %p)\n", debugstr_guid(rclsid),
188 debugstr_guid(iid), ppv, pProxyFileList, debugstr_guid(pclsid),
189 pPSFactoryBuffer);
190
191 *ppv = NULL;
192 if (!pPSFactoryBuffer->lpVtbl) init_psfactory( pPSFactoryBuffer, pProxyFileList );
193
194 if (pclsid && IsEqualGUID(rclsid, pclsid))
195 return IPSFactoryBuffer_QueryInterface((LPPSFACTORYBUFFER)pPSFactoryBuffer, iid, ppv);
196 else {
197 const ProxyFileInfo *info;
198 int index;
199 /* otherwise, the dll may be using the iid as the clsid, so
200 * search for it in the proxy file list */
201 if (FindProxyInfo(pProxyFileList, rclsid, &info, &index))
202 return IPSFactoryBuffer_QueryInterface((LPPSFACTORYBUFFER)pPSFactoryBuffer, iid, ppv);
203
204 WARN("class %s not available\n", debugstr_guid(rclsid));
206 }
207}
#define index(s, c)
Definition: various.h:29
#define WARN(fmt,...)
Definition: debug.h:112
static void init_psfactory(CStdPSFactoryBuffer *psfac, const ProxyFileInfo **file_list)
Definition: cpsf.c:145
#define NULL
Definition: types.h:112
GLuint index
Definition: glext.h:6031
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

Referenced by local_server_proc(), test_delegated_methods(), and test_NdrDllGetClassObject().

◆ NdrDllRegisterProxy()

HRESULT WINAPI 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:33
#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
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_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 char * PCInterfaceName
Definition: rpcproxy.h:42
static const WCHAR threadingmodelW[]
Definition: actctx.c:649
static const WCHAR nummethodsW[]
Definition: actctx.c:668
Definition: copy.c:22
Definition: name.c:39
unsigned char * LPBYTE
Definition: typedefs.h:53
#define E_HANDLE
Definition: winerror.h:2850
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
unsigned char BYTE
Definition: xxhash.c:193

Referenced by test_NdrDllRegisterProxy().

◆ NdrDllUnregisterProxy()

HRESULT WINAPI 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().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ole  )

Variable Documentation

◆ CStdPSFactory_Vtbl

const IPSFactoryBufferVtbl CStdPSFactory_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI CStdPSFactory_CreateStub(LPPSFACTORYBUFFER iface, REFIID riid, LPUNKNOWN pUnkServer, LPRPCSTUBBUFFER *ppStub)
Definition: cpsf.c:113
static ULONG WINAPI CStdPSFactory_Release(LPPSFACTORYBUFFER iface)
Definition: cpsf.c:90
static ULONG WINAPI CStdPSFactory_AddRef(LPPSFACTORYBUFFER iface)
Definition: cpsf.c:83
static HRESULT WINAPI CStdPSFactory_CreateProxy(LPPSFACTORYBUFFER iface, LPUNKNOWN pUnkOuter, REFIID riid, LPRPCPROXYBUFFER *ppProxy, LPVOID *ppv)
Definition: cpsf.c:97
static HRESULT WINAPI CStdPSFactory_QueryInterface(LPPSFACTORYBUFFER iface, REFIID riid, LPVOID *obj)
Definition: cpsf.c:68

Definition at line 135 of file cpsf.c.

Referenced by init_psfactory().