mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 18:43:37 +00:00
wow64win: Always use NtUserSetWindowLongPtr() for GWLP_HINSTANCE and GWLP_WNDPROC.
This commit is contained in:
parent
86893ce299
commit
94d61d1b28
|
@ -7293,6 +7293,15 @@ static void test_SetWindowLong(void)
|
|||
"SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%Ix\n", retval);
|
||||
ok(IsWindowUnicode(hwndMain), "hwndMain should now be Unicode\n");
|
||||
|
||||
/* Make sure nothing changes if we set the same proc */
|
||||
retval = SetWindowLongPtrW(hwndMain, GWLP_WNDPROC, (LONG_PTR)old_window_procW);
|
||||
todo_wine
|
||||
ok((WNDPROC)retval == main_window_procA, "unexpected proc 0x%Ix\n", retval);
|
||||
retval = GetWindowLongPtrW(hwndMain, GWLP_WNDPROC);
|
||||
ok((WNDPROC)retval == old_window_procW, "unexpected proc 0x%Ix\n", retval);
|
||||
retval = GetWindowLongPtrA(hwndMain, GWLP_WNDPROC);
|
||||
ok((WNDPROC)retval == main_window_procA, "unexpected proc 0x%Ix\n", retval);
|
||||
|
||||
/* set it back to ANSI */
|
||||
SetWindowLongPtrA(hwndMain, GWLP_WNDPROC, 0);
|
||||
}
|
||||
|
|
|
@ -3832,6 +3832,13 @@ NTSTATUS WINAPI wow64_NtUserSetWindowLong( UINT *args )
|
|||
LONG newval = get_ulong( &args );
|
||||
BOOL ansi = get_ulong( &args );
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case GWLP_HINSTANCE:
|
||||
case GWLP_WNDPROC:
|
||||
return NtUserSetWindowLongPtr( hwnd, offset, (ULONG)newval, ansi );
|
||||
}
|
||||
|
||||
return NtUserSetWindowLong( hwnd, offset, newval, ansi );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue