ole32: Implement IComThreadingInfo::GetCurrentLogicalThreadId().

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:
Nikolay Sivov 2016-03-10 12:51:34 +03:00 committed by Alexandre Julliard
parent 1105acd26a
commit 5b7c9ecd09
2 changed files with 14 additions and 2 deletions

View File

@ -4739,8 +4739,8 @@ static HRESULT WINAPI Context_CTI_GetCurrentThreadType(IComThreadingInfo *iface,
static HRESULT WINAPI Context_CTI_GetCurrentLogicalThreadId(IComThreadingInfo *iface, GUID *logical_thread_id)
{
FIXME("(%p): stub\n", logical_thread_id);
return E_NOTIMPL;
TRACE("(%p)\n", logical_thread_id);
return CoGetCurrentLogicalThreadId(logical_thread_id);
}
static HRESULT WINAPI Context_CTI_SetCurrentLogicalThreadId(IComThreadingInfo *iface, REFGUID logical_thread_id)

View File

@ -1782,6 +1782,7 @@ static void test_CoGetObjectContext(void)
struct info info;
HANDLE thread;
DWORD tid, exitcode;
GUID id, id2;
if (!pCoGetObjectContext)
{
@ -1810,6 +1811,17 @@ static void test_CoGetObjectContext(void)
pComThreadingInfo = NULL;
hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo);
ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr);
hr = IComThreadingInfo_GetCurrentLogicalThreadId(pComThreadingInfo, NULL);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
id = id2 = GUID_NULL;
hr = IComThreadingInfo_GetCurrentLogicalThreadId(pComThreadingInfo, &id);
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = CoGetCurrentLogicalThreadId(&id2);
ok(IsEqualGUID(&id, &id2), "got %s, expected %s\n", wine_dbgstr_guid(&id), wine_dbgstr_guid(&id2));
IComThreadingInfo_Release(pComThreadingInfo);
SetEvent(info.stop);