diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index 78854845575..82916a61a2c 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -45,6 +45,7 @@ typedef struct { const MIDL_STUBLESS_PROXY_INFO *stubless; const IID* piid; LPUNKNOWN pUnkOuter; + PCInterfaceName name; LPPSFACTORYBUFFER pPSFactory; LPRPCCHANNELBUFFER pChannel; struct StublessThunk *thunks; @@ -108,6 +109,7 @@ struct StublessThunk { int dummy; }; HRESULT WINAPI StdProxy_Construct(REFIID riid, LPUNKNOWN pUnkOuter, + PCInterfaceName name, CInterfaceProxyVtbl *vtbl, CInterfaceStubVtbl *svtbl, LPPSFACTORYBUFFER pPSFactory, @@ -117,7 +119,7 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid, StdProxyImpl *This; const MIDL_STUBLESS_PROXY_INFO *stubless = NULL; - TRACE("(%p,%p,%p,%p,%p)\n", pUnkOuter, vtbl, pPSFactory, ppProxy, ppvObj); + TRACE("(%p,%p,%p,%p,%p) %s\n", pUnkOuter, vtbl, pPSFactory, ppProxy, ppvObj, name); /* I can't find any other way to detect stubless proxies than this hack */ if (!IsEqualGUID(vtbl->header.piid, riid)) { @@ -167,6 +169,7 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid, This->stubless = stubless; This->piid = vtbl->header.piid; This->pUnkOuter = pUnkOuter; + This->name = name; This->pPSFactory = pPSFactory; This->pChannel = NULL; *ppProxy = (LPRPCPROXYBUFFER)&This->lpVtbl; @@ -263,7 +266,7 @@ HRESULT WINAPI StdProxy_GetChannel(LPVOID iface, LPRPCCHANNELBUFFER *ppChannel) { ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); - TRACE("(%p)->GetChannel(%p)\n",This,ppChannel); + TRACE("(%p)->GetChannel(%p) %s\n",This,ppChannel,This->name); *ppChannel = This->pChannel; return S_OK; @@ -273,7 +276,7 @@ HRESULT WINAPI StdProxy_GetIID(LPVOID iface, const IID **ppiid) { ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); - TRACE("(%p)->GetIID(%p)\n",This,ppiid); + TRACE("(%p)->GetIID(%p) %s\n",This,ppiid,This->name); *ppiid = This->piid; return S_OK; @@ -284,14 +287,14 @@ HRESULT WINAPI IUnknown_QueryInterface_Proxy(LPUNKNOWN iface, LPVOID *ppvObj) { ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); - TRACE("(%p)->QueryInterface(%s,%p)\n",This,debugstr_guid(riid),ppvObj); + TRACE("(%p)->QueryInterface(%s,%p) %s\n",This,debugstr_guid(riid),ppvObj,This->name); return IUnknown_QueryInterface(This->pUnkOuter,riid,ppvObj); } ULONG WINAPI IUnknown_AddRef_Proxy(LPUNKNOWN iface) { ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); - TRACE("(%p)->AddRef()\n",This); + TRACE("(%p)->AddRef() %s\n",This,This->name); #if 0 /* interface refcounting */ return ++(This->RefCount); #else /* object refcounting */ @@ -302,7 +305,7 @@ ULONG WINAPI IUnknown_AddRef_Proxy(LPUNKNOWN iface) ULONG WINAPI IUnknown_Release_Proxy(LPUNKNOWN iface) { ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); - TRACE("(%p)->Release()\n",This); + TRACE("(%p)->Release() %s\n",This,This->name); #if 0 /* interface refcounting */ if (!--(This->RefCount)) { StdProxy_Destruct((LPRPCPROXYBUFFER)&This->lpVtbl); diff --git a/dlls/rpcrt4/cpsf.c b/dlls/rpcrt4/cpsf.c index 8ea44e419cc..adc0d5072fc 100644 --- a/dlls/rpcrt4/cpsf.c +++ b/dlls/rpcrt4/cpsf.c @@ -92,8 +92,9 @@ static HRESULT WINAPI CStdPSFactory_CreateProxy(LPPSFACTORYBUFFER iface, debugstr_guid(riid),ppProxy,ppv); if (!FindProxyInfo(This->pProxyFileList,riid,&ProxyInfo,&Index)) return E_NOINTERFACE; - return StdProxy_Construct(riid, pUnkOuter, ProxyInfo->pProxyVtblList[Index], - ProxyInfo->pStubVtblList[Index], iface, ppProxy, ppv); + return StdProxy_Construct(riid, pUnkOuter, ProxyInfo->pNamesArray[Index], + ProxyInfo->pProxyVtblList[Index], + ProxyInfo->pStubVtblList[Index], iface, ppProxy, ppv); } static HRESULT WINAPI CStdPSFactory_CreateStub(LPPSFACTORYBUFFER iface, @@ -108,7 +109,8 @@ static HRESULT WINAPI CStdPSFactory_CreateStub(LPPSFACTORYBUFFER iface, pUnkServer,ppStub); if (!FindProxyInfo(This->pProxyFileList,riid,&ProxyInfo,&Index)) return E_NOINTERFACE; - return CStdStubBuffer_Construct(riid, pUnkServer, ProxyInfo->pStubVtblList[Index], iface, ppStub); + return CStdStubBuffer_Construct(riid, pUnkServer, ProxyInfo->pNamesArray[Index], + ProxyInfo->pStubVtblList[Index], iface, ppStub); } static ICOM_VTABLE(IPSFactoryBuffer) CStdPSFactory_Vtbl = @@ -173,7 +175,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll, TRACE("registering %s %s => %s\n", name, debugstr_guid(proxy->header.piid), clsid); UuidToStringA((UUID*)proxy->header.piid, (unsigned char**)&iid); - snprintf(keyname, sizeof(keyname), "Interface\\%s", iid); + snprintf(keyname, sizeof(keyname), "Interface\\{%s}", iid); RpcStringFreeA((unsigned char**)&iid); if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyname, 0, NULL, 0, KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) { @@ -181,7 +183,8 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll, RegSetValueExA(key, NULL, 0, REG_SZ, name, strlen(name)); if (RegCreateKeyExA(key, "ProxyStubClsid32", 0, NULL, 0, KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) { - RegSetValueExA(subkey, NULL, 0, REG_SZ, clsid, strlen(clsid)); + snprintf(module, sizeof(module), "{%s}", clsid); + RegSetValueExA(subkey, NULL, 0, REG_SZ, module, strlen(module)); RegCloseKey(subkey); } RegCloseKey(key); @@ -191,7 +194,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll, } /* register clsid to point to module */ - snprintf(keyname, sizeof(keyname), "CLSID\\%s", clsid); + snprintf(keyname, sizeof(keyname), "CLSID\\{%s}", clsid); GetModuleFileNameA(hDll, module, sizeof(module)); TRACE("registering CLSID %s => %s\n", clsid, module); if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyname, 0, NULL, 0, @@ -233,7 +236,7 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll, TRACE("unregistering %s %s <= %s\n", name, debugstr_guid(proxy->header.piid), clsid); UuidToStringA((UUID*)proxy->header.piid, (unsigned char**)&iid); - snprintf(keyname, sizeof(keyname), "Interface\\%s", iid); + snprintf(keyname, sizeof(keyname), "Interface\\{%s}", iid); RpcStringFreeA((unsigned char**)&iid); RegDeleteKeyA(HKEY_CLASSES_ROOT, keyname); } @@ -241,7 +244,7 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll, } /* unregister clsid */ - snprintf(keyname, sizeof(keyname), "CLSID\\%s", clsid); + snprintf(keyname, sizeof(keyname), "CLSID\\{%s}", clsid); GetModuleFileNameA(hDll, module, sizeof(module)); TRACE("unregistering CLSID %s <= %s\n", clsid, module); RegDeleteKeyA(HKEY_CLASSES_ROOT, keyname); diff --git a/dlls/rpcrt4/cpsf.h b/dlls/rpcrt4/cpsf.h index 1a64c04ed82..bdb6503ea63 100644 --- a/dlls/rpcrt4/cpsf.h +++ b/dlls/rpcrt4/cpsf.h @@ -23,6 +23,7 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid, LPUNKNOWN pUnkOuter, + PCInterfaceName name, CInterfaceProxyVtbl *vtbl, CInterfaceStubVtbl *svtbl, LPPSFACTORYBUFFER pPSFactory, @@ -35,6 +36,7 @@ HRESULT WINAPI StdProxy_GetIID(LPVOID iface, HRESULT WINAPI CStdStubBuffer_Construct(REFIID riid, LPUNKNOWN pUnkServer, + PCInterfaceName name, CInterfaceStubVtbl *vtbl, LPPSFACTORYBUFFER pPSFactory, LPRPCSTUBBUFFER *ppStub); diff --git a/dlls/rpcrt4/cstub.c b/dlls/rpcrt4/cstub.c index acc2f85cdbd..9e70b073fec 100644 --- a/dlls/rpcrt4/cstub.c +++ b/dlls/rpcrt4/cstub.c @@ -36,13 +36,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); HRESULT WINAPI CStdStubBuffer_Construct(REFIID riid, LPUNKNOWN pUnkServer, + PCInterfaceName name, CInterfaceStubVtbl *vtbl, LPPSFACTORYBUFFER pPSFactory, LPRPCSTUBBUFFER *ppStub) { CStdStubBuffer *This; - TRACE("(%p,%p,%p,%p)\n", pUnkServer, vtbl, pPSFactory, ppStub); + TRACE("(%p,%p,%p,%p) %s\n", pUnkServer, vtbl, pPSFactory, ppStub, name); TRACE("iid=%s\n", debugstr_guid(vtbl->header.piid)); TRACE("vtbl=%p\n", &vtbl->Vtbl);