VBoxHook.h revision e64031e20c39650a7bc902a3e1aba613b9415dee
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore/** @file
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore *
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore * VBoxHook -- Global windows hook dll
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore *
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore * Copyright (C) 2006-2007 Oracle Corporation
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore *
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore * This file is part of VirtualBox Open Source Edition (OSE), as
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore * available from http://www.virtualbox.org. This file is free software;
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore * you can redistribute it and/or modify it under the terms of the GNU
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore * General Public License (GPL) as published by the Free Software
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore * Foundation, in version 2 as it comes in the "COPYING" file of the
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore */
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore#ifndef __VBoxHook_h__
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov#define __VBoxHook_h__
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov/* custom messages as we must install the hook from the main thread */
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov#define WM_VBOX_INSTALL_SEAMLESS_HOOK 0x2001
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore#define WM_VBOX_REMOVE_SEAMLESS_HOOK 0x2002
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov#define WM_VBOX_SEAMLESS_UPDATE 0x2003
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore#define VBOXHOOK_DLL_NAME "VBoxHook.dll"
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov#define VBOXHOOK_GLOBAL_EVENT_NAME "Local\\VBoxHookNotifyEvent"
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov/* Install the global message hook */
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri PankovBOOL VBoxInstallHook(HMODULE hDll);
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore/* Remove the global message hook */
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri PankovBOOL VBoxRemoveHook();
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore#endif /* __VBoxHook_h__ */
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore