877cdc3f8d2e099773ad71796da9e0649a657d51
[reactos.git] / reactos / 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 return CallNextHookEx(hhk, nCode, wParam, lParam);
36 }
37 /*** END - HACK from win32csr... ***/
38
39 BOOL
40 WINAPI
41 DllMain(IN HINSTANCE hInstanceDll,
42 IN DWORD dwReason,
43 IN LPVOID lpReserved)
44 {
45 UNREFERENCED_PARAMETER(hInstanceDll);
46 UNREFERENCED_PARAMETER(dwReason);
47 UNREFERENCED_PARAMETER(lpReserved);
48
49 if (DLL_PROCESS_ATTACH == dwReason)
50 {
51 DPRINT1("WINSRV - HACK: Use keyboard hook hack\n");
52 /*** HACK from win32csr... ***/
53 //
54 // HACK HACK HACK ReactOS to BOOT! Initialization BUG ALERT! See bug 5655.
55 //
56 hhk = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHookProc, NULL, 0);
57 // BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT!
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
61 /*** END - HACK from win32csr... ***/
62 }
63
64 return TRUE;
65 }
66
67 /* EOF */