win32u: Return ERROR_GLOBAL_ONLY_HOOK when a thread ID is specified for global hooks.

This commit is contained in:
Zhiyi Zhang 2023-10-25 14:48:14 -05:00 committed by Alexandre Julliard
parent d2284bb6df
commit 6dfeab55bd
2 changed files with 1 additions and 2 deletions

View file

@ -12318,7 +12318,6 @@ static void test_set_hook(void)
|| i == WH_KEYBOARD_LL || i == WH_MOUSE_LL)
{
ok(!hhook, "SetWinEventHook succeeded.\n");
todo_wine
ok(error == ERROR_GLOBAL_ONLY_HOOK, "Got unexpected error %ld.\n", GetLastError());
}
else

View file

@ -91,7 +91,7 @@ HHOOK WINAPI NtUserSetWindowsHookEx( HINSTANCE inst, UNICODE_STRING *module, DWO
id == WH_SYSMSGFILTER)
{
/* these can only be global */
RtlSetLastWin32Error( ERROR_INVALID_PARAMETER );
RtlSetLastWin32Error( ERROR_GLOBAL_ONLY_HOOK );
return 0;
}
}