Commit 06a90f7f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

combase: Move CoGetCallContext().

parent 7a347c20
......@@ -1387,3 +1387,22 @@ void WINAPI DECLSPEC_HOTPATCH CoFreeUnusedLibraries(void)
{
CoFreeUnusedLibrariesEx(INFINITE, 0);
}
/***********************************************************************
* CoGetCallContext (combase.@)
*/
HRESULT WINAPI CoGetCallContext(REFIID riid, void **obj)
{
struct tlsdata *tlsdata;
HRESULT hr;
TRACE("%s, %p\n", debugstr_guid(riid), obj);
if (FAILED(hr = com_get_tlsdata(&tlsdata)))
return hr;
if (!tlsdata->call_state)
return RPC_E_CALL_COMPLETE;
return IUnknown_QueryInterface(tlsdata->call_state, riid, obj);
}
......@@ -97,7 +97,7 @@
@ stdcall CoGetActivationState(int128 long ptr)
@ stub CoGetApartmentID
@ stdcall CoGetApartmentType(ptr ptr) ole32.CoGetApartmentType
@ stdcall CoGetCallContext(ptr ptr) ole32.CoGetCallContext
@ stdcall CoGetCallContext(ptr ptr)
@ stdcall CoGetCallState(long ptr)
@ stdcall CoGetCallerTID(ptr) ole32.CoGetCallerTID
@ stub CoGetCancelObject
......
......@@ -3459,35 +3459,6 @@ HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, void *pvReserved)
}
/***********************************************************************
* CoGetCallContext [OLE32.@]
*
* Gets the context of the currently executing server call in the current
* thread.
*
* PARAMS
* riid [I] Context interface to return.
* ppv [O] Pointer to memory that will receive the context on return.
*
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*/
HRESULT WINAPI CoGetCallContext(REFIID riid, void **ppv)
{
struct oletls *info = COM_CurrentInfo();
TRACE("(%s, %p)\n", debugstr_guid(riid), ppv);
if (!info)
return E_OUTOFMEMORY;
if (!info->call_state)
return RPC_E_CALL_COMPLETE;
return IUnknown_QueryInterface(info->call_state, riid, ppv);
}
/***********************************************************************
* CoSwitchCallContext [OLE32.@]
*
* Switches the context of the currently executing server call in the current
......
......@@ -27,7 +27,7 @@
@ stdcall CoFreeUnusedLibrariesEx(long long)
@ stdcall CoGetActivationState(int128 long ptr) combase.CoGetActivationState
@ stdcall CoGetApartmentType(ptr ptr)
@ stdcall CoGetCallContext(ptr ptr)
@ stdcall CoGetCallContext(ptr ptr) combase.CoGetCallContext
@ stdcall CoGetCallState(long ptr) combase.CoGetCallState
@ stdcall CoGetCallerTID(ptr)
@ stdcall CoGetClassObject(ptr long ptr ptr 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