VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/VBoxHook/testcase/tstHook.cpp@ 10759

Last change on this file since 10759 was 8387, checked in by vboxsync, 17 years ago

eol

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1/*
2 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
3 *
4 * This file is part of VirtualBox Open Source Edition (OSE), as
5 * available from http://www.virtualbox.org. This file is free software;
6 * you can redistribute it and/or modify it under the terms of the GNU
7 * General Public License (GPL) as published by the Free Software
8 * Foundation, in version 2 as it comes in the "COPYING" file of the
9 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
10 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
11 *
12 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
13 * Clara, CA 95054 USA or visit http://www.sun.com if you need
14 * additional information or have any questions.
15 */
16
17/*******************************************************************************
18* Header Files *
19*******************************************************************************/
20#include <windows.h>
21#include <VBoxHook.h>
22#include <stdio.h>
23
24int main(int argc, char **argv)
25{
26 printf("Enabling global hook\n");
27
28 HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, VBOXHOOK_GLOBAL_EVENT_NAME);
29
30 VBoxInstallHook(GetModuleHandle("VBoxHook.dll"));
31 getchar();
32
33 printf("Disabling global hook\n");
34 VBoxRemoveHook();
35 return 0;
36}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette