Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
94d61d1b
Commit
94d61d1b
authored
Jul 12, 2023
by
Sven Baars
Committed by
Alexandre Julliard
Jul 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64win: Always use NtUserSetWindowLongPtr() for GWLP_HINSTANCE and GWLP_WNDPROC.
parent
86893ce2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
win.c
dlls/user32/tests/win.c
+9
-0
user.c
dlls/wow64win/user.c
+7
-0
No files found.
dlls/user32/tests/win.c
View file @
94d61d1b
...
...
@@ -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
);
}
...
...
dlls/wow64win/user.c
View file @
94d61d1b
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment