http://bugs.winehq.org/show_bug.cgi?id=24963
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #3 from Andrew Nguyen arethusa26@gmail.com 2010-10-31 16:07:27 CDT --- (In reply to comment #2)
I tried writing a little test for this behavior:
/* Test a system cursor with LR_LOADFROMFILE incorrectly specified, as
Okad2 does */ handle = LoadImageA(NULL, IDC_APPSTARTING, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE|LR_LOADFROMFILE); ok(handle != NULL, "LoadImage() from system resource with LR_LOADFROMFILE failed.\n");
but on Vista, it crashed. Okad2, on the other hand, runs on Vista. So I don't know what's going on. Can you write a small C program that succeeds on Windows and fails on Wine in the same way as Okad2?
NT-based platforms seem to have a compatibility hack within user32 or thereabouts that looks at the PE optional header version fields. I ran an unmodified user32_crosstest.exe with your test through the test bot, which showed that LoadImageA on platforms older than Win2k3 fail with the test parameters, while Vista and newer platforms crash.
After using a PE editor on user32_crosstest.exe to change the required OS version, image version, and subsystem version to match Okad2's values, running that executable through the test bot showed that LoadImageA succeeds for the given parameters on all platforms except Win98.
Do we want to replicate the exact compatibility check, or should we just change LoadImage to succeed/fail as it does on Win2k3 and older?