Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9b3aa968
Commit
9b3aa968
authored
Jul 19, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Pack messages in WH_CALLWNDPROCRET hooks.
parent
7cc06fb9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
hook.c
dlls/user32/hook.c
+12
-0
hook.c
dlls/win32u/hook.c
+7
-0
user.c
dlls/wow64win/user.c
+9
-0
No files found.
dlls/user32/hook.c
View file @
9b3aa968
...
...
@@ -495,6 +495,18 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size )
ret_size
=
0
;
break
;
}
case
WH_CALLWNDPROCRET
:
if
(
ret_size
>
sizeof
(
CWPRETSTRUCT
))
{
CWPRETSTRUCT
*
cwpret
=
(
CWPRETSTRUCT
*
)
params
->
lparam
;
size_t
offset
=
(
lparam_offset
+
sizeof
(
*
cwpret
)
+
15
)
&
~
15
;
void
*
buffer
=
(
char
*
)
params
+
offset
;
unpack_message
(
cwpret
->
hwnd
,
cwpret
->
message
,
&
cwpret
->
wParam
,
&
cwpret
->
lParam
,
&
buffer
,
size
-
offset
,
!
params
->
prev_unicode
);
ret_size
=
0
;
break
;
}
}
}
if
(
params
->
module
[
0
]
&&
!
(
proc
=
get_hook_proc
(
proc
,
params
->
module
,
&
free_module
)))
...
...
dlls/win32u/hook.c
View file @
9b3aa968
...
...
@@ -295,6 +295,13 @@ static LRESULT call_hook( struct win_hook_params *info, const WCHAR *module, siz
cwp
->
message
,
cwp
->
lParam
,
ansi
);
}
break
;
case
WH_CALLWNDPROCRET
:
{
CWPRETSTRUCT
*
cwpret
=
(
CWPRETSTRUCT
*
)((
char
*
)
params
+
lparam_offset
);
pack_user_message
(
(
char
*
)
params
+
message_offset
,
message_size
,
cwpret
->
message
,
cwpret
->
lParam
,
ansi
);
}
break
;
}
}
...
...
dlls/wow64win/user.c
View file @
9b3aa968
...
...
@@ -766,6 +766,15 @@ static UINT hook_lparam_64to32( int id, int code, const void *lp, size_t size, v
cwpret32
.
message
=
cwpret
->
message
;
cwpret32
.
hwnd
=
HandleToUlong
(
cwpret
->
hwnd
);
memcpy
(
lp32
,
&
cwpret32
,
sizeof
(
cwpret32
)
);
if
(
size
>
sizeof
(
*
cwpret
))
{
const
size_t
offset64
=
(
sizeof
(
*
cwpret
)
+
15
)
&
~
15
;
const
size_t
offset32
=
(
sizeof
(
cwpret32
)
+
15
)
&
~
15
;
size
=
packed_message_64to32
(
cwpret32
.
message
,
(
const
char
*
)
lp
+
offset64
,
(
char
*
)
lp32
+
offset32
,
size
-
offset64
);
return
offset32
+
size
;
}
return
sizeof
(
cwpret32
);
}
...
...
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