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
58a03a10
Commit
58a03a10
authored
May 20, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Use winproc callbacks instead of message map/unmap in SendMessage16.
parent
396ff000
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
25 deletions
+27
-25
msg16.c
dlls/user/msg16.c
+23
-23
winproc.c
dlls/user/winproc.c
+2
-2
winproc.h
dlls/user/winproc.h
+2
-0
No files found.
dlls/user/msg16.c
View file @
58a03a10
...
...
@@ -30,14 +30,33 @@ WINE_DEFAULT_DEBUG_CHANNEL(msg);
DWORD
USER16_AlertableWait
=
0
;
static
LRESULT
cwp_hook_callback
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
,
LRESULT
*
result
,
void
*
arg
)
{
CWPSTRUCT
cwp
;
cwp
.
hwnd
=
hwnd
;
cwp
.
message
=
msg
;
cwp
.
wParam
=
wp
;
cwp
.
lParam
=
lp
;
*
result
=
0
;
return
HOOK_CallHooks
(
WH_CALLWNDPROC
,
HC_ACTION
,
1
,
(
LPARAM
)
&
cwp
,
FALSE
);
}
static
LRESULT
send_message_callback
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
,
LRESULT
*
result
,
void
*
arg
)
{
*
result
=
SendMessageA
(
hwnd
,
msg
,
wp
,
lp
);
return
*
result
;
}
/***********************************************************************
* SendMessage (USER.111)
*/
LRESULT
WINAPI
SendMessage16
(
HWND16
hwnd16
,
UINT16
msg
,
WPARAM16
wparam
,
LPARAM
lparam
)
{
LRESULT
result
;
UINT
msg32
;
WPARAM
wparam32
;
HWND
hwnd
=
WIN_Handle32
(
hwnd16
);
if
(
hwnd
!=
HWND_BROADCAST
&&
WIN_IsCurrentThread
(
hwnd
))
...
...
@@ -47,22 +66,7 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM
/* first the WH_CALLWNDPROC hook */
if
(
HOOK_IsHooked
(
WH_CALLWNDPROC
))
{
LPARAM
lparam32
=
lparam
;
if
(
WINPROC_MapMsg16To32A
(
hwnd
,
msg
,
wparam
,
&
msg32
,
&
wparam32
,
&
lparam32
)
!=
-
1
)
{
CWPSTRUCT
cwp
;
cwp
.
hwnd
=
hwnd
;
cwp
.
message
=
msg32
;
cwp
.
wParam
=
wparam32
;
cwp
.
lParam
=
lparam32
;
HOOK_CallHooks
(
WH_CALLWNDPROC
,
HC_ACTION
,
1
,
(
LPARAM
)
&
cwp
,
FALSE
);
WINPROC_UnmapMsg16To32A
(
hwnd
,
msg32
,
wparam32
,
lparam32
,
0
);
/* FIXME: should reflect changes back into the message we send */
}
}
WINPROC_CallProc16To32A
(
cwp_hook_callback
,
hwnd16
,
msg
,
wparam
,
lparam
,
&
result
,
NULL
);
if
(
!
(
winproc
=
(
WNDPROC16
)
GetWindowLong16
(
hwnd16
,
GWLP_WNDPROC
)))
return
0
;
...
...
@@ -72,11 +76,7 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM
}
else
/* map to 32-bit unicode for inter-thread/process message */
{
if
(
WINPROC_MapMsg16To32W
(
hwnd
,
msg
,
wparam
,
&
msg32
,
&
wparam32
,
&
lparam
)
==
-
1
)
return
0
;
result
=
WINPROC_UnmapMsg16To32W
(
hwnd
,
msg32
,
wparam32
,
lparam
,
SendMessageW
(
hwnd
,
msg32
,
wparam32
,
lparam
),
NULL
);
WINPROC_CallProc16To32A
(
send_message_callback
,
hwnd16
,
msg
,
wparam
,
lparam
,
&
result
,
NULL
);
}
return
result
;
}
...
...
dlls/user/winproc.c
View file @
58a03a10
...
...
@@ -2902,8 +2902,8 @@ static LRESULT WINPROC_CallProcWtoA( winproc_callback_t callback, HWND hwnd, UIN
/**********************************************************************
* WINPROC_CallProc16To32A
*/
static
LRESULT
WINPROC_CallProc16To32A
(
winproc_callback_t
callback
,
HWND16
hwnd
,
UINT16
msg
,
WPARAM16
wParam
,
LPARAM
lParam
,
LRESULT
*
result
,
void
*
arg
)
LRESULT
WINPROC_CallProc16To32A
(
winproc_callback_t
callback
,
HWND16
hwnd
,
UINT16
msg
,
WPARAM16
wParam
,
LPARAM
lParam
,
LRESULT
*
result
,
void
*
arg
)
{
LRESULT
ret
;
UINT
msg32
;
...
...
dlls/user/winproc.h
View file @
58a03a10
...
...
@@ -57,6 +57,8 @@ extern BOOL WINPROC_IsUnicode( WNDPROC proc, BOOL def_val );
extern
LRESULT
WINPROC_CallProcAtoW
(
winproc_callback_t
callback
,
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
LRESULT
*
result
,
void
*
arg
);
extern
LRESULT
WINPROC_CallProc16To32A
(
winproc_callback_t
callback
,
HWND16
hwnd
,
UINT16
msg
,
WPARAM16
wParam
,
LPARAM
lParam
,
LRESULT
*
result
,
void
*
arg
);
extern
INT
WINPROC_MapMsg16To32A
(
HWND
hwnd
,
UINT16
msg16
,
WPARAM16
wParam16
,
UINT
*
pmsg32
,
WPARAM
*
pwparam32
,
...
...
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