From 2c01eb392b0fd85a0b8c1be653a6356bee8e2942 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 4 Apr 2022 16:58:49 +0200 Subject: [PATCH] user32: Use NtUserMessageCall for SendNotifyMessageA implementation. Signed-off-by: Jacek Caban Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- 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 ); }