user32: test what FindWindow when window isn't found

Austin English austinenglish at gmail.com
Thu Aug 14 10:58:53 CDT 2008


On Wed, Aug 13, 2008 at 10:09 PM, Dmitry Timoshkov
<dmitry at codeweavers.com> wrote:
> "Austin English" <austinenglish at gmail.com> wrote:
>
>> -    /* test FindWindow behavior */
>> +    SetLastError(0xdeadbeef);
>> +    HWND hWnd = FindWindow("SomeWindowThatDoesNotExist", NULL);
>> +    if(hWnd) {
>> +      printf("hWnd not NULL");
>> +    }
>> +    else {
>> +
>> +     todo_wine
>> +     ok(GetLastError() == ERROR_FILE_NOT_FOUND, "ERROR_FILE_NOT_FOUND,
>> got %d\n", GetLastError());
>> +    }
>
> Why did you remove the comment? Introducing 'hWnd' variable is not needed,
> there is one already called 'found', besides declaring variables in the code
> is not allowed in Wine. It would be much simpler to add the last error test
> to 2 existing FindWindowExA calls instead of introducing something looking
> as foreign code (in indentation, braces usage and spaces).
>
> --
> Dmitry.
>

Thanks for the comments! Here's an updated patch. Passes in Win2K.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-user32-test-what-FindWindow-does-when-window-isn-t-fo.txt
Url: http://www.winehq.org/pipermail/wine-devel/attachments/20080814/c97eabb5/attachment.txt 


More information about the wine-devel mailing list