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
e7aa8945
Commit
e7aa8945
authored
Jul 18, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use user message packing for WM_HELP.
parent
69834a30
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
13 deletions
+56
-13
winproc.c
dlls/user32/winproc.c
+2
-13
message.c
dlls/win32u/message.c
+16
-0
user.c
dlls/wow64win/user.c
+38
-0
No files found.
dlls/user32/winproc.c
View file @
e7aa8945
...
...
@@ -853,23 +853,11 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
case
WM_COMPAREITEM
:
case
WM_WINDOWPOSCHANGING
:
case
WM_WINDOWPOSCHANGED
:
case
WM_HELP
:
break
;
case
WM_NOTIFY
:
/* WM_NOTIFY cannot be sent across processes (MSDN) */
return
FALSE
;
case
WM_HELP
:
{
HELPINFO
hi
;
if
(
size
<
sizeof
(
ps
->
hi
))
return
FALSE
;
hi
.
cbSize
=
sizeof
(
hi
);
hi
.
iContextType
=
ps
->
hi
.
iContextType
;
hi
.
iCtrlId
=
ps
->
hi
.
iCtrlId
;
hi
.
hItemHandle
=
unpack_handle
(
ps
->
hi
.
hItemHandle
);
hi
.
dwContextId
=
(
ULONG_PTR
)
unpack_ptr
(
ps
->
hi
.
dwContextId
);
hi
.
MousePos
=
ps
->
hi
.
MousePos
;
memcpy
(
&
ps
->
hi
,
&
hi
,
sizeof
(
hi
)
);
break
;
}
case
WM_STYLECHANGING
:
case
WM_STYLECHANGED
:
minsize
=
sizeof
(
STYLESTRUCT
);
...
...
@@ -1114,6 +1102,7 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
case
WM_WINDOWPOSCHANGING
:
case
WM_WINDOWPOSCHANGED
:
case
WM_COPYDATA
:
case
WM_HELP
:
{
LRESULT
*
result_ptr
=
(
LRESULT
*
)
buffer
-
1
;
*
result_ptr
=
result
;
...
...
dlls/win32u/message.c
View file @
e7aa8945
...
...
@@ -523,6 +523,19 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
memcpy
(
&
ps
->
cds
,
&
cds
,
sizeof
(
cds
)
);
break
;
}
case
WM_HELP
:
{
HELPINFO
hi
;
if
(
size
<
sizeof
(
ps
->
hi
))
return
FALSE
;
hi
.
cbSize
=
sizeof
(
hi
);
hi
.
iContextType
=
ps
->
hi
.
iContextType
;
hi
.
iCtrlId
=
ps
->
hi
.
iCtrlId
;
hi
.
hItemHandle
=
wine_server_ptr_handle
(
ps
->
hi
.
hItemHandle
);
hi
.
dwContextId
=
(
ULONG_PTR
)
unpack_ptr
(
ps
->
hi
.
dwContextId
);
hi
.
MousePos
=
ps
->
hi
.
MousePos
;
memcpy
(
&
ps
->
hi
,
&
hi
,
sizeof
(
hi
)
);
break
;
}
case
WM_WINE_SETWINDOWPOS
:
{
WINDOWPOS
wp
;
...
...
@@ -1332,6 +1345,9 @@ size_t user_message_size( UINT message, WPARAM wparam, LPARAM lparam, BOOL other
size
=
sizeof
(
*
cds
)
+
cds
->
cbData
;
break
;
}
case
WM_HELP
:
size
=
sizeof
(
HELPINFO
);
break
;
}
return
size
;
...
...
dlls/wow64win/user.c
View file @
e7aa8945
...
...
@@ -220,6 +220,16 @@ typedef struct
typedef
struct
{
UINT
cbSize
;
INT
iContextType
;
INT
iCtrlId
;
ULONG
hItemHandle
;
DWORD
dwContextId
;
POINT
MousePos
;
}
HELPINFO32
;
typedef
struct
{
UINT
CtlType
;
UINT
CtlID
;
UINT
itemID
;
...
...
@@ -734,6 +744,20 @@ static size_t packed_message_64to32( UINT message, WPARAM wparam,
if
(
size
)
memmove
(
(
char
*
)
params32
+
sizeof
(
cds32
),
cds64
+
1
,
size
);
return
sizeof
(
cds32
)
+
size
;
}
case
WM_HELP
:
{
HELPINFO32
hi32
;
const
HELPINFO
*
hi64
=
params64
;
hi32
.
cbSize
=
sizeof
(
hi32
);
hi32
.
iContextType
=
hi64
->
iContextType
;
hi32
.
iCtrlId
=
hi64
->
iCtrlId
;
hi32
.
hItemHandle
=
HandleToLong
(
hi64
->
hItemHandle
);
hi32
.
dwContextId
=
hi64
->
dwContextId
;
hi32
.
MousePos
=
hi64
->
MousePos
;
memcpy
(
params32
,
&
hi32
,
sizeof
(
hi32
)
);
return
sizeof
(
hi32
);
}
}
memmove
(
params32
,
params64
,
size
);
...
...
@@ -3280,6 +3304,20 @@ static LRESULT message_call_32to64( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
return
NtUserMessageCall
(
hwnd
,
msg
,
wparam
,
(
LPARAM
)
&
cds
,
result_info
,
type
,
ansi
);
}
case
WM_HELP
:
{
HELPINFO32
*
hi32
=
(
void
*
)
lparam
;
HELPINFO
hi64
;
hi64
.
cbSize
=
sizeof
(
hi64
);
hi64
.
iContextType
=
hi32
->
iContextType
;
hi64
.
iCtrlId
=
hi32
->
iCtrlId
;
hi64
.
hItemHandle
=
LongToHandle
(
hi32
->
hItemHandle
);
hi64
.
dwContextId
=
hi32
->
dwContextId
;
hi64
.
MousePos
=
hi32
->
MousePos
;
return
NtUserMessageCall
(
hwnd
,
msg
,
wparam
,
(
LPARAM
)
&
hi64
,
result_info
,
type
,
ansi
);
}
case
WM_GETDLGCODE
:
if
(
lparam
)
{
...
...
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