Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 21 +++++++++++++++++++++ dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 35 ----------------------------------- dlls/ole32/ole32.spec | 2 +- 4 files changed, 23 insertions(+), 37 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index b87c6f19bac..595a7569b09 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -503,3 +503,24 @@ HRESULT WINAPI CoSetProxyBlanket(IUnknown *proxy, DWORD authn_service, DWORD aut if (FAILED(hr)) ERR("-- failed with %#x.\n", hr); return hr; } + +/*********************************************************************** + * CoCopyProxy (combase.@) + */ +HRESULT WINAPI CoCopyProxy(IUnknown *proxy, IUnknown **proxy_copy) +{ + IClientSecurity *client_security; + HRESULT hr; + + TRACE("%p, %p.\n", proxy, proxy_copy); + + hr = IUnknown_QueryInterface(proxy, &IID_IClientSecurity, (void **)&client_security); + if (SUCCEEDED(hr)) + { + hr = IClientSecurity_CopyProxy(client_security, proxy, proxy_copy); + IClientSecurity_Release(client_security); + } + + if (FAILED(hr)) ERR("-- failed with %#x.\n", hr); + return hr; +} diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 88d3adeec9e..669b42486fd 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -75,7 +75,7 @@ @ stdcall CoAddRefServerProcess() ole32.CoAddRefServerProcess @ stub CoAllowUnmarshalerCLSID @ stub CoCancelCall -@ stdcall CoCopyProxy(ptr ptr) ole32.CoCopyProxy +@ stdcall CoCopyProxy(ptr ptr) @ stub CoCreateErrorInfo @ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) ole32.CoCreateFreeThreadedMarshaler @ stdcall CoCreateGuid(ptr) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index aeb7c4d29c2..b1fedf17c88 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -4192,41 +4192,6 @@ HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, void *pvReserved) return S_OK; }
-/*********************************************************************** - * CoCopyProxy [OLE32.@] - * - * Copies a proxy. - * - * PARAMS - * pProxy [I] Pointer to the proxy object. - * ppCopy [O] Copy of the proxy. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - * - * SEE ALSO - * CoQueryProxyBlanket, CoSetProxyBlanket. - */ -HRESULT WINAPI CoCopyProxy(IUnknown *pProxy, IUnknown **ppCopy) -{ - IClientSecurity *pCliSec; - HRESULT hr; - - TRACE("%p\n", pProxy); - - hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (void **)&pCliSec); - if (SUCCEEDED(hr)) - { - hr = IClientSecurity_CopyProxy(pCliSec, pProxy, ppCopy); - IClientSecurity_Release(pCliSec); - } - - if (FAILED(hr)) ERR("-- failed with 0x%08x\n", hr); - return hr; -} - - /*********************************************************************** * CoGetCallContext [OLE32.@] * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 54725e406ac..c64392d5238 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -9,7 +9,7 @@ @ stdcall CoAddRefServerProcess() @ stdcall CoAllowSetForegroundWindow(ptr ptr) @ stdcall CoBuildVersion() -@ stdcall CoCopyProxy(ptr ptr) +@ stdcall CoCopyProxy(ptr ptr) combase.CoCopyProxy @ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) @ stdcall CoCreateGuid(ptr) combase.CoCreateGuid @ stdcall CoCreateInstance(ptr ptr long ptr ptr)