Commit 0e37c674 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserUnhookWinEvent implementation from user32.

parent 3e4f4c02
......@@ -766,34 +766,6 @@ HWINEVENTHOOK WINAPI SetWinEventHook(DWORD event_min, DWORD event_max,
return handle;
}
/***********************************************************************
* UnhookWinEvent [USER32.@]
*
* Remove an event hook for a set of events.
*
* PARAMS
* hEventHook [I] Event hook to remove
*
* RETURNS
* Success: TRUE. The event hook has been removed.
* Failure: FALSE, if hEventHook is invalid.
*/
BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK hEventHook)
{
BOOL ret;
SERVER_START_REQ( remove_hook )
{
req->handle = wine_server_user_handle( hEventHook );
req->id = WH_WINEVENT;
ret = !wine_server_call_err( req );
if (ret) get_user_thread_info()->active_hooks = reply->active_hooks;
}
SERVER_END_REQ;
return ret;
}
static inline BOOL find_first_hook(DWORD id, DWORD event, HWND hwnd, LONG object_id,
LONG child_id, struct hook_info *info)
{
......
......@@ -770,7 +770,7 @@
@ stdcall TranslateMDISysAccel(long ptr)
@ stdcall TranslateMessage(ptr)
# @ stub TranslateMessageEx
@ stdcall UnhookWinEvent(long)
@ stdcall UnhookWinEvent(long) NtUserUnhookWinEvent
@ stdcall UnhookWindowsHook(long ptr)
@ stdcall UnhookWindowsHookEx(long)
@ stdcall UnionRect(ptr ptr ptr)
......
......@@ -28,6 +28,7 @@ C_SRCS = \
font.c \
freetype.c \
gdiobj.c \
hook.c \
input.c \
main.c \
mapping.c \
......
/*
* Windows hook functions
*
* Copyright 2002 Alexandre Julliard
* Copyright 2005 Dmitry Timoshkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "win32u_private.h"
#include "ntuser_private.h"
#include "wine/server.h"
#define WH_WINEVENT (WH_MAXHOOK+1)
/***********************************************************************
* NtUserUnhookWinEvent (win32u.@)
*/
BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK handle )
{
BOOL ret;
SERVER_START_REQ( remove_hook )
{
req->handle = wine_server_user_handle( handle );
req->id = WH_WINEVENT;
ret = !wine_server_call_err( req );
if (ret) get_user_thread_info()->active_hooks = reply->active_hooks;
}
SERVER_END_REQ;
return ret;
}
......@@ -139,6 +139,7 @@ static void * const syscalls[] =
NtUserSetProcessWindowStation,
NtUserSetProp,
NtUserSetThreadDesktop,
NtUserUnhookWinEvent,
};
static BYTE arguments[ARRAY_SIZE(syscalls)];
......
......@@ -1284,7 +1284,7 @@
@ stub NtUserTranslateAccelerator
@ stub NtUserTranslateMessage
@ stub NtUserUndelegateInput
@ stub NtUserUnhookWinEvent
@ stdcall -syscall NtUserUnhookWinEvent(long)
@ stub NtUserUnhookWindowsHookEx
@ stub NtUserUnloadKeyboardLayout
@ stub NtUserUnlockWindowStation
......
......@@ -125,6 +125,7 @@
SYSCALL_ENTRY( NtUserSetProcessDpiAwarenessContext ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserSetProp ) \
SYSCALL_ENTRY( NtUserSetThreadDesktop )
SYSCALL_ENTRY( NtUserSetThreadDesktop ) \
SYSCALL_ENTRY( NtUserUnhookWinEvent )
#endif /* __WOW64WIN_SYSCALL_H */
......@@ -355,3 +355,10 @@ NTSTATUS WINAPI wow64_NtUserGetDoubleClickTime( UINT *args )
{
return NtUserGetDoubleClickTime();
}
NTSTATUS WINAPI wow64_NtUserUnhookWinEvent( UINT *args )
{
HWINEVENTHOOK handle = get_handle( &args );
return NtUserUnhookWinEvent( handle );
}
......@@ -184,6 +184,7 @@ BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, void *ptr, UIN
BOOL WINAPI NtUserSystemParametersInfoForDpi( UINT action, UINT val, PVOID ptr, UINT winini, UINT dpi );
INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
WCHAR *str, int size, UINT flags, HKL layout );
BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook );
BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id );
WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment