combase: Move CoGetCurrentLogicalThreadId().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
90c0e3a4dd
commit
6e0e890fba
|
@ -2211,3 +2211,25 @@ HRESULT WINAPI CoGetContextToken(ULONG_PTR *token)
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CoGetCurrentLogicalThreadId (combase.@)
|
||||||
|
*/
|
||||||
|
HRESULT WINAPI CoGetCurrentLogicalThreadId(GUID *id)
|
||||||
|
{
|
||||||
|
struct tlsdata *tlsdata;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
if (!id)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (FAILED(hr = com_get_tlsdata(&tlsdata)))
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
if (IsEqualGUID(&tlsdata->causality_id, &GUID_NULL))
|
||||||
|
CoCreateGuid(&tlsdata->causality_id);
|
||||||
|
|
||||||
|
*id = tlsdata->causality_id;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
@ stdcall CoGetClassObject(ptr long ptr ptr ptr) ole32.CoGetClassObject
|
@ stdcall CoGetClassObject(ptr long ptr ptr ptr) ole32.CoGetClassObject
|
||||||
@ stub CoGetClassVersion
|
@ stub CoGetClassVersion
|
||||||
@ stdcall CoGetContextToken(ptr)
|
@ stdcall CoGetContextToken(ptr)
|
||||||
@ stdcall CoGetCurrentLogicalThreadId(ptr) ole32.CoGetCurrentLogicalThreadId
|
@ stdcall CoGetCurrentLogicalThreadId(ptr)
|
||||||
@ stdcall CoGetCurrentProcess() ole32.CoGetCurrentProcess
|
@ stdcall CoGetCurrentProcess() ole32.CoGetCurrentProcess
|
||||||
@ stdcall CoGetDefaultContext(long ptr ptr)
|
@ stdcall CoGetDefaultContext(long ptr ptr)
|
||||||
@ stdcall CoGetErrorInfo(long ptr) GetErrorInfo
|
@ stdcall CoGetErrorInfo(long ptr) GetErrorInfo
|
||||||
|
|
|
@ -2914,20 +2914,6 @@ DWORD WINAPI CoGetCurrentProcess(void)
|
||||||
return info->thread_seqid;
|
return info->thread_seqid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* CoGetCurrentLogicalThreadId [OLE32.@]
|
|
||||||
*/
|
|
||||||
HRESULT WINAPI CoGetCurrentLogicalThreadId(GUID *id)
|
|
||||||
{
|
|
||||||
TRACE("(%p)\n", id);
|
|
||||||
|
|
||||||
if (!id)
|
|
||||||
return E_INVALIDARG;
|
|
||||||
|
|
||||||
*id = COM_CurrentCausalityId();
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CoIsOle1Class [OLE32.@]
|
* CoIsOle1Class [OLE32.@]
|
||||||
*
|
*
|
||||||
|
|
|
@ -287,16 +287,6 @@ static inline APARTMENT* COM_CurrentApt(void)
|
||||||
return COM_CurrentInfo()->apt;
|
return COM_CurrentInfo()->apt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline GUID COM_CurrentCausalityId(void)
|
|
||||||
{
|
|
||||||
struct oletls *info = COM_CurrentInfo();
|
|
||||||
if (!info)
|
|
||||||
return GUID_NULL;
|
|
||||||
if (IsEqualGUID(&info->causality_id, &GUID_NULL))
|
|
||||||
CoCreateGuid(&info->causality_id);
|
|
||||||
return info->causality_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* helpers for debugging */
|
/* helpers for debugging */
|
||||||
# define DEBUG_SET_CRITSEC_NAME(cs, name) (cs)->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": " name)
|
# define DEBUG_SET_CRITSEC_NAME(cs, name) (cs)->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": " name)
|
||||||
# define DEBUG_CLEAR_CRITSEC_NAME(cs) (cs)->DebugInfo->Spare[0] = 0
|
# define DEBUG_CLEAR_CRITSEC_NAME(cs) (cs)->DebugInfo->Spare[0] = 0
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
@ stdcall CoGetCallerTID(ptr)
|
@ stdcall CoGetCallerTID(ptr)
|
||||||
@ stdcall CoGetClassObject(ptr long ptr ptr ptr)
|
@ stdcall CoGetClassObject(ptr long ptr ptr ptr)
|
||||||
@ stdcall CoGetContextToken(ptr) combase.CoGetContextToken
|
@ stdcall CoGetContextToken(ptr) combase.CoGetContextToken
|
||||||
@ stdcall CoGetCurrentLogicalThreadId(ptr)
|
@ stdcall CoGetCurrentLogicalThreadId(ptr) combase.CoGetCurrentLogicalThreadId
|
||||||
@ stdcall CoGetCurrentProcess()
|
@ stdcall CoGetCurrentProcess()
|
||||||
@ stdcall CoGetDefaultContext(long ptr ptr) combase.CoGetDefaultContext
|
@ stdcall CoGetDefaultContext(long ptr ptr) combase.CoGetDefaultContext
|
||||||
@ stdcall CoGetInstanceFromFile(ptr ptr ptr long long wstr long ptr) combase.CoGetInstanceFromFile
|
@ stdcall CoGetInstanceFromFile(ptr ptr ptr long long wstr long ptr) combase.CoGetInstanceFromFile
|
||||||
|
|
|
@ -659,7 +659,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
|
||||||
|
|
||||||
message_state->channel_hook_info.iid = *riid;
|
message_state->channel_hook_info.iid = *riid;
|
||||||
message_state->channel_hook_info.cbSize = sizeof(message_state->channel_hook_info);
|
message_state->channel_hook_info.cbSize = sizeof(message_state->channel_hook_info);
|
||||||
message_state->channel_hook_info.uCausality = COM_CurrentCausalityId();
|
CoGetCurrentLogicalThreadId(&message_state->channel_hook_info.uCausality);
|
||||||
message_state->channel_hook_info.dwServerPid = This->server_pid;
|
message_state->channel_hook_info.dwServerPid = This->server_pid;
|
||||||
message_state->channel_hook_info.iMethod = msg->ProcNum & ~RPC_FLAGS_VALID_BIT;
|
message_state->channel_hook_info.iMethod = msg->ProcNum & ~RPC_FLAGS_VALID_BIT;
|
||||||
message_state->channel_hook_info.pObject = NULL; /* only present on server-side */
|
message_state->channel_hook_info.pObject = NULL; /* only present on server-side */
|
||||||
|
|
Loading…
Reference in New Issue