ole32: Implement semi-stub for CoGetApartmentType.
Sebastian Lackner
sebastian at fds-team.de
Wed Mar 2 01:58:55 CST 2016
On 02.03.2016 08:40, Nikolay Sivov wrote:
> On 02.03.2016 10:30, Sebastian Lackner wrote:
>> + return info->apt ? ERROR_SUCCESS : CO_E_NOTINITIALIZED;
>
> It should be S_OK.
Oops, good catch. Thanks.
>
>> + hr = pCoGetApartmentType(NULL, NULL);
>> + ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%08x\n", hr);
>> + hr = pCoGetApartmentType(&type, NULL);
>> + ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%08x\n", hr);
>> + hr = pCoGetApartmentType(NULL, &qualifier);
>> + ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%08x\n", hr);
>> +
>> + hr = pCoGetApartmentType(&type, &qualifier);
>> + ok(hr == CO_E_NOTINITIALIZED, "CoGetApartmentType succeeded, error: 0x%08x\n", hr);
>> + ok(type == APTTYPE_CURRENT, "Expected APTTYPE_CURRENT, got %u\n", type);
>> + ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier);
>
> Please set out variables to some unrealistic values before the calls, to
> see if it actually sets them.
>
> Also if they are set for CO_E_NOTINITIALIZED, it's possible they are set
> for E_INVALIDARG cases too, and that's not tested (for both initialized
> and not initialized cases).
I've added some variable initializations and tests for the E_INVALIDARG case.
(Well, and I forgot to adjust the subject when sending v2, but that shouldn't matter ^^)
Does it look good for you now, or any additional remarks?
More information about the wine-devel
mailing list