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
730d462b
Commit
730d462b
authored
Jul 16, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Always use NtCallbackReturn to pass result from User32CallWindowsHook.
parent
8f168ea6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
hook.c
dlls/user32/hook.c
+7
-9
user.c
dlls/wow64win/user.c
+1
-1
No files found.
dlls/user32/hook.c
View file @
730d462b
...
...
@@ -457,9 +457,9 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size )
HOOKPROC
proc
=
params
->
proc
;
const
WCHAR
*
module
=
NULL
;
HMODULE
free_module
=
0
;
void
*
ret_
lparam
=
NULL
;
void
*
ret_
ptr
=
NULL
;
CBT_CREATEWNDW
cbtc
;
UINT
ret_
lparam_
size
=
0
;
UINT
ret_size
=
0
;
LRESULT
ret
;
if
(
size
>
sizeof
(
*
params
)
+
params
->
lparam_size
)
...
...
@@ -467,9 +467,9 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size )
if
(
params
->
lparam_size
)
{
ret_
lparam
=
(
void
*
)
params
->
lparam
;
ret_
lparam_size
=
params
->
lparam_size
;
params
->
lparam
=
(
LPARAM
)
(
params
+
1
)
;
ret_
size
=
params
->
lparam_size
;
ret_
ptr
=
params
+
1
;
params
->
lparam
=
(
LPARAM
)
ret_ptr
;
if
(
params
->
id
==
WH_CBT
&&
params
->
code
==
HCBT_CREATEWND
)
{
...
...
@@ -487,7 +487,7 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size )
cbtc
.
hwndInsertAfter
=
HWND_TOP
;
cbtc
.
lpcs
=
cs
;
params
->
lparam
=
(
LPARAM
)
&
cbtc
;
ret_
lparam_
size
=
sizeof
(
*
cs
);
ret_size
=
sizeof
(
*
cs
);
}
}
if
(
module
&&
!
(
proc
=
get_hook_proc
(
proc
,
module
,
&
free_module
)))
return
FALSE
;
...
...
@@ -496,9 +496,7 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size )
params
->
prev_unicode
,
params
->
next_unicode
);
if
(
free_module
)
FreeLibrary
(
free_module
);
if
(
ret_lparam
)
memcpy
(
ret_lparam
,
params
+
1
,
ret_lparam_size
);
else
if
(
ret_lparam_size
)
NtCallbackReturn
(
params
+
1
,
ret_lparam_size
,
ret
);
return
ret
;
return
NtCallbackReturn
(
ret_ptr
,
ret_size
,
ret
);
}
/***********************************************************************
...
...
dlls/wow64win/user.c
View file @
730d462b
...
...
@@ -769,7 +769,7 @@ static NTSTATUS WINAPI wow64_NtUserCallWindowsHook( void *arg, ULONG size )
params32
.
id
=
params
->
id
;
params32
.
code
=
params
->
code
;
params32
.
wparam
=
params
->
wparam
;
params32
.
lparam
=
lparam64_size
?
0
:
params
->
lparam
;
params32
.
lparam
=
params
->
lparam
;
params32
.
prev_unicode
=
params
->
prev_unicode
;
params32
.
next_unicode
=
params
->
next_unicode
;
params32
.
lparam_size
=
hook_lparam_64to32
(
params32
.
id
,
params32
.
code
,
params
+
1
,
...
...
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