setupapi: Implement SetupOpenLog(), SetupLogErrorA(), SetupLogErrorW(), SetupCloseLog() (resend)

Pierre Schweitzer pierre at reactos.org
Thu Mar 12 07:05:26 CDT 2015


On 03/12/2015 11:51 AM, Nikolay Sivov wrote:
> On 12.03.2015 13:17, Pierre Schweitzer wrote:
>>
>>>
>>>> +    SetLastError(0xdeadbeef);
>>>> +    ret = SetupLogErrorW(NULL, LogSevInformation);
>>>> +    error = GetLastError();
>>>> +    if (!ret) ok(error == ERROR_INVALID_PARAMETER, "got wrong error:
>>>> %d\n", error); /* Win Vista + */
>>>> +    else ok(ret, "SetupLogError failed\n");
>>>
>>> This makes no sense, is it supposed to fail or not?
>>
>> Well. Depends.
>> On Windows Vista and more, it will fail, with ERROR_INVALID_PARAMETER.
>> Below, it will just print (null) in the log file.
>> This was the solution I found to make the test work on all the available
>> test VMs Wine has.
>>
>> As a side note, my implementation matches Win2k3 behavior: it prints
>> (null). I find this more compatible than the restrictive behavior in
>> Vista+.
>> Of course, this is questionable.
> 
> Then we need to decide which one is broken() and mark it as such, in my
> opinion complying with vista+ behavior would be better. These log files
> are write-and-forget from installer point of view, so it's unlikely that
> anything depends on (null) string being written.

Well, I was more in the mood of keeping the implementation that can do
more (ie, the one that write (null) instead of returning an error). But,
if you prefer Vista+ behavior, then, I'll adapt.

> 
>>
>> I will submit a new patch addressing your four comments later today.
>>
>> Cheers,
>>
> 


-- 
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4277 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150312/2b1637bb/attachment-0001.bin>


More information about the wine-devel mailing list