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
9f63cbc0
Commit
9f63cbc0
authored
Aug 15, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64win: Implement wow64_NtUserCallWinProc.
parent
85012b91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
6 deletions
+76
-6
winproc.c
dlls/user32/winproc.c
+12
-4
message.c
dlls/win32u/message.c
+1
-0
user.c
dlls/wow64win/user.c
+63
-2
No files found.
dlls/user32/winproc.c
View file @
9f63cbc0
...
...
@@ -1176,12 +1176,13 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
BOOL
WINAPI
User32CallWindowProc
(
struct
win_proc_params
*
params
,
ULONG
size
)
{
LRESULT
result
,
*
result_ptr
=
params
->
result
;
params
->
result
=
&
result
;
if
(
params
->
needs_unpack
)
{
char
stack_buffer
[
128
];
void
*
buffer
;
LRESULT
result
;
if
(
size
>
sizeof
(
*
params
))
{
...
...
@@ -1196,8 +1197,6 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
if
(
!
unpack_message
(
params
->
hwnd
,
params
->
msg
,
&
params
->
wparam
,
&
params
->
lparam
,
&
buffer
,
size
))
return
0
;
params
->
result
=
&
result
;
dispatch_win_proc_params
(
params
);
...
...
@@ -1206,7 +1205,16 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
if
(
buffer
!=
stack_buffer
&&
buffer
!=
params
+
1
)
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
else
dispatch_win_proc_params
(
params
);
else
{
dispatch_win_proc_params
(
params
);
if
(
result_ptr
)
{
*
result_ptr
=
result
;
return
TRUE
;
}
NtCallbackReturn
(
&
result
,
sizeof
(
result
),
TRUE
);
}
return
TRUE
;
}
...
...
dlls/win32u/message.c
View file @
9f63cbc0
...
...
@@ -265,6 +265,7 @@ static BOOL dispatch_win_proc_params( struct win_proc_params *params, size_t siz
thread_info
->
recursion_count
++
;
KeUserModeCallback
(
NtUserCallWinProc
,
params
,
size
,
&
ret_ptr
,
&
ret_len
);
if
(
ret_len
==
sizeof
(
*
params
->
result
))
*
params
->
result
=
*
(
LRESULT
*
)
ret_ptr
;
thread_info
->
recursion_count
--
;
return
TRUE
;
...
...
dlls/wow64win/user.c
View file @
9f63cbc0
...
...
@@ -152,6 +152,23 @@ struct client_menu_name32
ULONG
nameUS
;
};
struct
win_proc_params32
{
ULONG
func
;
ULONG
hwnd
;
UINT
msg
;
ULONG
wparam
;
ULONG
lparam
;
ULONG
result
;
BOOL
ansi
;
BOOL
ansi_dst
;
BOOL
needs_unpack
;
enum
wm_char_mapping
mapping
;
ULONG
dpi_awareness
;
ULONG
procA
;
ULONG
procW
;
};
static
MSG
*
msg_32to64
(
MSG
*
msg
,
const
MSG32
*
msg32
)
{
if
(
!
msg32
)
return
NULL
;
...
...
@@ -200,6 +217,24 @@ static struct client_menu_name32 *client_menu_name_64to32( const struct client_m
return
name32
;
}
static
void
win_proc_params_64to32
(
const
struct
win_proc_params
*
src
,
struct
win_proc_params32
*
dst
,
ULONG
*
result
)
{
dst
->
func
=
PtrToUlong
(
src
->
func
);
dst
->
hwnd
=
HandleToUlong
(
src
->
hwnd
);
dst
->
msg
=
src
->
msg
;
dst
->
wparam
=
src
->
wparam
;
dst
->
lparam
=
src
->
lparam
;
dst
->
result
=
PtrToUlong
(
result
);
dst
->
ansi
=
src
->
ansi
;
dst
->
ansi_dst
=
src
->
ansi_dst
;
dst
->
needs_unpack
=
src
->
needs_unpack
;
dst
->
mapping
=
src
->
mapping
;
dst
->
dpi_awareness
=
HandleToUlong
(
src
->
dpi_awareness
);
dst
->
procA
=
PtrToUlong
(
src
->
procA
);
dst
->
procW
=
PtrToUlong
(
src
->
procW
);
}
static
NTSTATUS
dispatch_callback
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
void
*
ret_ptr
;
...
...
@@ -256,8 +291,34 @@ static NTSTATUS WINAPI wow64_NtUserCallWinEventHook( void *arg, ULONG size )
static
NTSTATUS
WINAPI
wow64_NtUserCallWinProc
(
void
*
arg
,
ULONG
size
)
{
FIXME
(
"
\n
"
);
return
0
;
struct
win_proc_params
*
params
=
arg
;
struct
win_proc_params32
params32_buf
,
*
params32
=
&
params32_buf
;
LONG
result32
=
0
;
LRESULT
result
;
void
*
ret_ptr
;
ULONG
ret_len
;
NTSTATUS
status
;
if
(
size
>
sizeof
(
*
params
))
{
if
(
!
(
params32
=
Wow64AllocateTemp
(
size
-
sizeof
(
*
params
)
+
sizeof
(
*
params32
)
)))
return
0
;
memcpy
(
params32
+
1
,
params
+
1
,
size
-
sizeof
(
*
params
)
);
}
win_proc_params_64to32
(
params
,
params32
,
NULL
);
status
=
Wow64KiUserCallbackDispatcher
(
NtUserCallWinProc
,
params32
,
size
-
sizeof
(
*
params
)
+
sizeof
(
*
params32
),
&
ret_ptr
,
&
ret_len
);
if
(
ret_len
==
sizeof
(
result32
))
result32
=
*
(
LONG
*
)
ret_ptr
;
result
=
result32
;
if
(
params
->
result
)
{
*
params
->
result
=
result
;
return
status
;
}
return
NtCallbackReturn
(
&
result
,
sizeof
(
result
),
status
);
}
static
NTSTATUS
WINAPI
wow64_NtUserCallWindowsHook
(
void
*
arg
,
ULONG
size
)
...
...
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