Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 20 ++++++++++++++++++++ dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 28 ---------------------------- dlls/ole32/ole32.spec | 2 +- 4 files changed, 22 insertions(+), 30 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index 7f1d6a63201..752658012c4 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -20,6 +20,8 @@ #define COBJMACROS #define NONAMELESSUNION
+#define USE_COM_CONTEXT_DEF +#include "objbase.h" #include "oleauto.h"
#include "wine/debug.h" @@ -587,3 +589,21 @@ HRESULT WINAPI CoRevertToSelf(void)
return hr; } + +/*********************************************************************** + * CoGetObjectContext (combase.@) + */ +HRESULT WINAPI CoGetObjectContext(REFIID riid, void **ppv) +{ + IObjContext *context; + HRESULT hr; + + TRACE("%s, %p.\n", debugstr_guid(riid), ppv); + + *ppv = NULL; + hr = CoGetContextToken((ULONG_PTR *)&context); + if (FAILED(hr)) + return hr; + + return IObjContext_QueryInterface(context, riid, ppv); +} diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index e67e7159bde..c84c10a21f1 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -113,7 +113,7 @@ @ stdcall CoGetMalloc(long ptr) @ stdcall CoGetMarshalSizeMax(ptr ptr ptr long ptr long) ole32.CoGetMarshalSizeMax @ stub CoGetModuleType -@ stdcall CoGetObjectContext(ptr ptr) ole32.CoGetObjectContext +@ stdcall CoGetObjectContext(ptr ptr) @ stdcall CoGetPSClsid(ptr ptr) ole32.CoGetPSClsid @ stub CoGetProcessIdentifier @ stdcall CoGetStandardMarshal(ptr ptr long ptr long ptr) ole32.CoGetStandardMarshal diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 06dd4aefc72..6a0c518081e 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -4789,34 +4789,6 @@ static const IObjContextVtbl Context_Object_Vtbl = Context_OC_Reserved7 };
-/*********************************************************************** - * CoGetObjectContext [OLE32.@] - * - * Retrieves an object associated with the current context (i.e. apartment). - * - * PARAMS - * riid [I] ID of the interface of the object to retrieve. - * ppv [O] Address where object will be stored on return. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - */ -HRESULT WINAPI CoGetObjectContext(REFIID riid, void **ppv) -{ - IObjContext *context; - HRESULT hr; - - TRACE("(%s, %p)\n", debugstr_guid(riid), ppv); - - *ppv = NULL; - hr = CoGetContextToken((ULONG_PTR*)&context); - if (FAILED(hr)) - return hr; - - return IObjContext_QueryInterface(context, riid, ppv); -} - /*********************************************************************** * CoGetContextToken [OLE32.@] */ diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index e23c57b4041..faccb54292d 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -41,7 +41,7 @@ @ stdcall CoGetMalloc(long ptr) combase.CoGetMalloc @ stdcall CoGetMarshalSizeMax(ptr ptr ptr long ptr long) @ stdcall CoGetObject(wstr ptr ptr ptr) -@ stdcall CoGetObjectContext(ptr ptr) +@ stdcall CoGetObjectContext(ptr ptr) combase.CoGetObjectContext @ stdcall CoGetPSClsid(ptr ptr) @ stdcall CoGetStandardMarshal(ptr ptr long ptr long ptr) @ stdcall CoGetState(ptr)