[PATCH] user32: Add an exception handler to GetWindowText.

Rémi Bernon rbernon at codeweavers.com
Wed Oct 13 10:13:41 CDT 2021


On 10/13/21 4:42 PM, Zebediah Figura (she/her) wrote:
> On 10/13/21 05:18, Dmitry Timoshkov wrote:
>> Rémi Bernon <rbernon at codeweavers.com> wrote:
>>
>>> Then I'm not sure if it's good to catch all exceptions. It will swallow
>>> any error coming from the heap or send message. Is it really what it
>>> should do?
>>
>> I have an application that passes rubbish addresses to GetWindowText(),
>> and apparently it works fine under Windows.
>>
> 
> Should the exception be handled here, though? Is it swallowed for the 
> cross-process case? Should it be in DefWindowProc() instead?
> 

We don't send a message for the cross process case, we call wineserver 
instead.

Also, as far as I could see, the window proc isn't even called when an 
invalid string is passed, and the function still returns 0.

Which matches what we are doing, as we write to the buffer once before 
calling SendMessageW.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list