Jacek Caban : user32: Use NtUserMessageCall for SendNotifyMessageA implementation.

Alexandre Julliard julliard at winehq.org
Tue Apr 5 15:39:44 CDT 2022


Module: wine
Branch: master
Commit: 2c01eb392b0fd85a0b8c1be653a6356bee8e2942
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2c01eb392b0fd85a0b8c1be653a6356bee8e2942

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Apr  4 16:58:49 2022 +0200

user32: Use NtUserMessageCall for SendNotifyMessageA implementation.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/message.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 220b0b94d4f..cdf84523be0 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -2246,23 +2246,10 @@ LRESULT WINAPI SendMessageA( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
  */
 BOOL WINAPI SendNotifyMessageA( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
 {
-    struct send_message_info info;
-
-    if (is_pointer_message( msg, wparam ))
-    {
-        SetLastError( ERROR_MESSAGE_SYNC_ONLY );
+    if (!WIN_IsCurrentThread( hwnd ) && !map_wparam_AtoW( msg, &wparam, WMCHAR_MAP_SENDMESSAGE ))
         return FALSE;
-    }
 
-    info.type    = MSG_NOTIFY;
-    info.hwnd    = hwnd;
-    info.msg     = msg;
-    info.wparam  = wparam;
-    info.lparam  = lparam;
-    info.flags   = 0;
-    info.wm_char = WMCHAR_MAP_SENDMESSAGETIMEOUT;
-
-    return send_message( &info, NULL, FALSE );
+    return NtUserMessageCall( hwnd, msg, wparam, lparam, 0, FNID_SENDNOTIFYMESSAGE, TRUE );
 }
 
 




More information about the wine-cvs mailing list