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.
From: Sven Baars sbaars@codeweavers.com
--- dlls/win32u/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index b3047e7299a..993046bd633 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1429,7 +1429,7 @@ WORD WINAPI NtUserSetWindowWord( HWND hwnd, INT offset, WORD newval ) */ LONG WINAPI NtUserSetWindowLong( HWND hwnd, INT offset, LONG newval, BOOL ansi ) { - return set_window_long( hwnd, offset, sizeof(LONG), newval, ansi ); + return set_window_long( hwnd, offset, sizeof(LONG), (ULONG)newval, ansi ); }
/*****************************************************************************
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.