[KERNEL32]
[reactos.git] / win32ss / user / winsrv / init.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS User API Server DLL
4 * FILE: win32ss/user/winsrv/init.c
5 * PURPOSE: Initialization
6 * PROGRAMMERS: Dmitry Philippov (shedon@mail.ru)
7 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8 */
9
10 /* INCLUDES *******************************************************************/
11
12 /* PSDK Headers */
13 #include <stdarg.h>
14 #define WIN32_NO_STATUS
15 #define _INC_WINDOWS
16 #define COM_NO_WINDOWS_H
17 #include <windef.h>
18 #include <winuser.h>
19
20 #define NDEBUG
21 #include <debug.h>
22
23
24 /* ENTRY-POINT ****************************************************************/
25
26 /*** HACK from win32csr... ***/
27 static HHOOK hhk = NULL;
28
29 LRESULT
30 CALLBACK
31 KeyboardHookProc(int nCode,
32 WPARAM wParam,
33 LPARAM lParam)
34 {
35 DPRINT1("KeyboardHookProc Processing!\n");
36 return CallNextHookEx(hhk, nCode, wParam, lParam);
37 }
38 /*** END - HACK from win32csr... ***/
39
40 BOOL
41 WINAPI
42 DllMain(IN HINSTANCE hInstanceDll,
43 IN DWORD dwReason,
44 IN LPVOID lpReserved)
45 {
46 UNREFERENCED_PARAMETER(hInstanceDll);
47 UNREFERENCED_PARAMETER(dwReason);
48 UNREFERENCED_PARAMETER(lpReserved);
49
50 if (DLL_PROCESS_ATTACH == dwReason)
51 {
52 DPRINT1("WINSRV - HACK: Use keyboard hook hack\n");
53 /*** HACK from win32csr... ***/
54 //
55 // HACK HACK HACK ReactOS to BOOT! Initialization BUG ALERT! See bug 5655.
56 //
57 hhk = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHookProc, NULL, 0);
58 // BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT!
59 // BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT!
60 // BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT!
61
62 /*** END - HACK from win32csr... ***/
63 }
64
65 return TRUE;
66 }
67
68 /* EOF */