[PATCH] ole32: Implement CoGetCurrentLogicalThreadId()

Huw Davies huw at codeweavers.com
Thu Mar 10 03:26:09 CST 2016


On Wed, Mar 09, 2016 at 11:43:26PM +0300, Nikolay Sivov wrote:
> diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
> index 183d8a0..e0c396f 100644
> --- a/dlls/ole32/tests/compobj.c
> +++ b/dlls/ole32/tests/compobj.c
> @@ -3093,6 +3093,21 @@ static void test_IMallocSpy(void)
>      ok(hr == CO_E_OBJNOTREG, "got 0x%08x\n", hr);
>  }
>  
> +static void test_CoGetCurrentLogicalThreadId(void)
> +{
> +    GUID id, id2;
> +    HRESULT hr;
> +
> +    hr = CoGetCurrentLogicalThreadId(NULL);
> +    ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
> +
> +    memset(&id, 0, sizeof(id));
> +    memset(&id2, 0, sizeof(id2));
> +    hr = CoGetCurrentLogicalThreadId(&id);
> +    ok(hr == S_OK, "got 0x%08x\n", hr);
> +    ok(memcmp(&id, &id2, sizeof(id)), "got zero id\n");

Any reason why you didn't do
ok(!IsEqualGUID(&id, &GUID_NULL), ...) here?


A follow-up patch could implement
Context_CTI_GetCurrentLogicalThreadId() using
CoGetCurrentLogicalThreadId().

Huw.



More information about the wine-devel mailing list