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

Nikolay Sivov bunglehead at
Thu Mar 12 05:51:03 CDT 2015

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.

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

More information about the wine-devel mailing list