This fixes SetWindowLongPtr on WoW64. On 32-bit, we have
``` #define SetWindowLongPtrA SetWindowLongA #define SetWindowLongPtrW SetWindowLongW ```
meaning that on WoW64, all pointers passed would be padded with `0xffffffff` (because they are treated as LONG), and this is the cause of many of the failing WoW64 tests. This fixes that behavior. I'm not sure if this is the right place to fix it though.
-- v3: wow64win: Always use NtUserSetWindowLongPtr() for GWLP_WNDPROC.
From: Sven Baars sbaars@codeweavers.com
--- dlls/wow64win/user.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 8065a05f44a..4e1b36857c0 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -3832,6 +3832,9 @@ NTSTATUS WINAPI wow64_NtUserSetWindowLong( UINT *args ) LONG newval = get_ulong( &args ); BOOL ansi = get_ulong( &args );
+ if (offset == GWLP_WNDPROC) + return NtUserSetWindowLongPtr( hwnd, offset, (ULONG)newval, ansi ); + return NtUserSetWindowLong( hwnd, offset, newval, ansi ); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=134726
Your paranoid android.
=== debian11 (32 bit report) ===
quartz: dsoundrender: Timeout
On Wed Jul 12 07:13:59 2023 +0000, Jacek Caban wrote:
We still want to extend bits for cases like GWLP_HWNDPARENT. I think that it would be better to call NtUserSetWindowLongPtr from wow64_NtUserSetWindowLong for offsets that need it.
I changed it to only do this for `GWLP_WNDPROC` in `wow64_NtUserSetWindowLong`.
On Wed Jul 12 07:13:59 2023 +0000, Sven Baars wrote:
I changed it to only do this for `GWLP_WNDPROC` in `wow64_NtUserSetWindowLong`.
We should probably also do this for `GWLP_HINSTANCE`.