Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
fcef0261
Commit
fcef0261
authored
23 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Reject pointer messages in SendNotifyMessage[AW] and
SendMessageCallback[AW]. Fixed prototypes.
parent
d2cb1d14
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/winuser.h
+5
-5
5 additions, 5 deletions
include/winuser.h
windows/message.c
+68
-57
68 additions, 57 deletions
windows/message.c
with
73 additions
and
62 deletions
include/winuser.h
+
5
−
5
View file @
fcef0261
...
...
@@ -27,7 +27,7 @@ typedef BOOL CALLBACK (*PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
typedef
BOOL
CALLBACK
(
*
PROPENUMPROCW
)(
HWND
,
LPCWSTR
,
HANDLE
);
typedef
BOOL
CALLBACK
(
*
PROPENUMPROCEXA
)(
HWND
,
LPCSTR
,
HANDLE
,
DWORD
);
typedef
BOOL
CALLBACK
(
*
PROPENUMPROCEXW
)(
HWND
,
LPCWSTR
,
HANDLE
,
DWORD
);
typedef
VOID
CALLBACK
(
*
SENDASYNCPROC
)(
HWND
,
UINT
,
DWORD
,
LRESULT
);
typedef
VOID
CALLBACK
(
*
SENDASYNCPROC
)(
HWND
,
UINT
,
ULONG_PTR
,
LRESULT
);
typedef
VOID
CALLBACK
(
*
TIMERPROC
)(
HWND
,
UINT
,
UINT
,
DWORD
);
typedef
BOOL
CALLBACK
(
*
WNDENUMPROC
)(
HWND
,
LPARAM
);
#else
...
...
@@ -3261,11 +3261,11 @@ BOOL WINAPI RegisterHotKey(HWND,INT,UINT,UINT);
HDEVNOTIFY
WINAPI
RegisterDeviceNotificationA
(
HANDLE
,
LPVOID
,
DWORD
);
HDEVNOTIFY
WINAPI
RegisterDeviceNotificationW
(
HANDLE
,
LPVOID
,
DWORD
);
#define RegisterDeviceNotification WINELIB_NAME_AW(RegisterDeviceNotification)
BOOL
WINAPI
SendMessageCallbackA
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
FARPROC
,
DWORD
);
BOOL
WINAPI
SendMessageCallbackW
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
FARPROC
,
DWORD
);
BOOL
WINAPI
SendMessageCallbackA
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
SENDASYNCPROC
,
ULONG_PTR
);
BOOL
WINAPI
SendMessageCallbackW
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
SENDASYNCPROC
,
ULONG_PTR
);
#define SendMessageCallback WINELIB_NAME_AW(SendMessageCallback)
BOOL
WINAPI
SendNotifyMessageA
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
BOOL
WINAPI
SendNotifyMessageW
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
BOOL
WINAPI
SendNotifyMessageA
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
BOOL
WINAPI
SendNotifyMessageW
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
#define SendNotifyMessage WINELIB_NAME_AW(SendNotifyMessage)
VOID
WINAPI
SetDebugErrorLevel
(
DWORD
);
VOID
WINAPI
SetLastErrorEx
(
DWORD
,
DWORD
);
...
...
This diff is collapsed.
Click to expand it.
windows/message.c
+
68
−
57
View file @
fcef0261
...
...
@@ -1864,6 +1864,74 @@ LRESULT WINAPI SendMessageTimeoutW( HWND hwnd, UINT msg, WPARAM wParam,
}
/***********************************************************************
* SendNotifyMessageA (USER32.@)
*/
BOOL
WINAPI
SendNotifyMessageA
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
return
SendNotifyMessageW
(
hwnd
,
msg
,
map_wparam_AtoW
(
msg
,
wParam
),
lParam
);
}
/***********************************************************************
* SendNotifyMessageW (USER32.@)
*/
BOOL
WINAPI
SendNotifyMessageW
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
is_pointer_message
(
msg
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
return
MSG_SendMessage
(
hwnd
,
msg
,
wParam
,
lParam
,
INFINITE
,
QMSG_WIN32W
,
NULL
);
}
/***********************************************************************
* SendMessageCallbackA (USER32.@)
*/
BOOL
WINAPI
SendMessageCallbackA
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
SENDASYNCPROC
callback
,
ULONG_PTR
data
)
{
return
SendMessageCallbackW
(
hwnd
,
msg
,
map_wparam_AtoW
(
msg
,
wParam
),
lParam
,
callback
,
data
);
}
/***********************************************************************
* SendMessageCallbackW (USER32.@)
*
* FIXME: It's like PostMessage. The callback gets called when the message
* is processed. We have to modify the message processing for an exact
* implementation...
* The callback is only called when the thread that called us calls one of
* Get/Peek/WaitMessage.
*/
BOOL
WINAPI
SendMessageCallbackW
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
SENDASYNCPROC
callback
,
ULONG_PTR
data
)
{
LRESULT
result
;
if
(
is_pointer_message
(
msg
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
FIXME
(
"(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08x),stub!
\n
"
,
hwnd
,
msg
,
wParam
,
lParam
,
callback
,
data
);
if
(
hwnd
==
HWND_BROADCAST
)
{
PostMessageW
(
hwnd
,
msg
,
wParam
,
lParam
);
FIXME
(
"Broadcast: Callback will not be called!
\n
"
);
return
TRUE
;
}
result
=
SendMessageW
(
hwnd
,
msg
,
wParam
,
lParam
);
callback
(
hwnd
,
msg
,
data
,
result
);
return
TRUE
;
}
/***********************************************************************
* WaitMessage (USER.112) Suspend thread pending messages
* WaitMessage (USER32.@) Suspend thread pending messages
...
...
@@ -2531,60 +2599,3 @@ LONG WINAPI BroadcastSystemMessage(
);
return
0
;
}
/***********************************************************************
* SendNotifyMessageA (USER32.@)
*/
BOOL
WINAPI
SendNotifyMessageA
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
return
MSG_SendMessage
(
hwnd
,
msg
,
wParam
,
lParam
,
INFINITE
,
QMSG_WIN32A
,
NULL
);
}
/***********************************************************************
* SendNotifyMessageW (USER32.@)
*/
BOOL
WINAPI
SendNotifyMessageW
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
return
MSG_SendMessage
(
hwnd
,
msg
,
wParam
,
lParam
,
INFINITE
,
QMSG_WIN32W
,
NULL
);
}
/***********************************************************************
* SendMessageCallbackA (USER32.@)
* FIXME: It's like PostMessage. The callback gets called when the message
* is processed. We have to modify the message processing for an exact
* implementation...
* The callback is only called when the thread that called us calls one of
* Get/Peek/WaitMessage.
*/
BOOL
WINAPI
SendMessageCallbackA
(
HWND
hWnd
,
UINT
Msg
,
WPARAM
wParam
,
LPARAM
lParam
,
FARPROC
lpResultCallBack
,
DWORD
dwData
)
{
FIXME
(
"(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!
\n
"
,
hWnd
,
Msg
,
wParam
,
lParam
,
lpResultCallBack
,
dwData
);
if
(
hWnd
==
HWND_BROADCAST
)
{
PostMessageA
(
hWnd
,
Msg
,
wParam
,
lParam
);
FIXME
(
"Broadcast: Callback will not be called!
\n
"
);
return
TRUE
;
}
(
lpResultCallBack
)(
hWnd
,
Msg
,
dwData
,
SendMessageA
(
hWnd
,
Msg
,
wParam
,
lParam
));
return
TRUE
;
}
/***********************************************************************
* SendMessageCallbackW (USER32.@)
* FIXME: see SendMessageCallbackA.
*/
BOOL
WINAPI
SendMessageCallbackW
(
HWND
hWnd
,
UINT
Msg
,
WPARAM
wParam
,
LPARAM
lParam
,
FARPROC
lpResultCallBack
,
DWORD
dwData
)
{
FIXME
(
"(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!
\n
"
,
hWnd
,
Msg
,
wParam
,
lParam
,
lpResultCallBack
,
dwData
);
if
(
hWnd
==
HWND_BROADCAST
)
{
PostMessageW
(
hWnd
,
Msg
,
wParam
,
lParam
);
FIXME
(
"Broadcast: Callback will not be called!
\n
"
);
return
TRUE
;
}
(
lpResultCallBack
)(
hWnd
,
Msg
,
dwData
,
SendMessageA
(
hWnd
,
Msg
,
wParam
,
lParam
));
return
TRUE
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment