Ensure that GetSystemMenu returns valid HMENU unless bRevert specified

Brent Roman brent at mbari.org
Mon Jun 15 11:24:01 CDT 2009


Hi Dan,

The app I've been trying to run for years under Wine is:

http://www.quadravox.com/AQ430.htm

The version I use is 2.0.6.9, but I strongly suspect the problem will
show up in their current versions as well.
You may download a 30-day trial version to verify the bug fix.
However, I think the logic bug in GetSystemMenu is pretty obvious.

After a few hours of poking
around with assembly code in the wine debugger, it became clear that
the app was getting a nil HMENU from GetSystemMenu even though
its bRevert parameter was false.  Windows on-line docs state that
GetSystemMenu() should return a nil HMENU only when reverting
to the standard system menu.  Real Windows apparently does not check
whether the current window's dwStyle bits are set appropriately, where
the wine version requires this.   That's the easiest explanation
for the behavior I observed...

To replicate:
    create a project in the IDE
    try to build it.

- brent

P.S.  I'm a big fan of your crosstools config scripts for GCC!

Dan Kegel wrote:
> Brent wrote:
>   
>> This was causing some apps to crash with invalid read from address 0x4.
>>     
>
> Which apps?  Is there a bug report for this?
> - Dan
>   





More information about the wine-devel mailing list