Commit b8f21f76 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

combase: Move CoGetObjectContext().

parent 7955d3d3
......@@ -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);
}
......@@ -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
......
......@@ -4790,34 +4790,6 @@ static const IObjContextVtbl Context_Object_Vtbl =
};
/***********************************************************************
* 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.@]
*/
HRESULT WINAPI CoGetContextToken( ULONG_PTR *token )
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment