Changeset 10245 for trunk/src/user32/inituser32.cpp
- Timestamp:
- Sep 11, 2003, 2:57:53 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/inituser32.cpp
r8202 r10245 1 /* $Id: inituser32.cpp,v 1.1 1 2002-04-07 14:36:59sandervl Exp $ */1 /* $Id: inituser32.cpp,v 1.12 2003-09-11 12:57:53 sandervl Exp $ */ 2 2 /* 3 3 * USER32 DLL entry point … … 97 97 { 98 98 APIRET rc; 99 100 if (pmkbdhk_installed == FALSE )99 100 if (pmkbdhk_installed == FALSE && PMKBDHK_MODULE[0]) 101 101 { 102 102 CHAR szBuf[260]; 103 103 104 104 // load the DLL 105 105 rc = DosLoadModule(szBuf, … … 112 112 _hab, 113 113 rc)); 114 114 115 115 return; 116 116 } 117 117 118 118 // get the entry points 119 119 rc = DosQueryProcAddr(hmodPMKBDHK, … … 126 126 PMKBDHK_HOOK_TERM, 127 127 (PFN*)&pfnHookTerm); 128 128 129 129 if (NO_ERROR != rc) 130 130 { … … 132 132 _hab, 133 133 rc)); 134 134 135 135 // free the DLL again 136 136 DosFreeModule(hmodPMKBDHK); 137 137 hmodPMKBDHK = NULLHANDLE; 138 138 139 139 return; 140 140 } 141 141 142 142 // now finally call the initializer function 143 143 pfnHookInit(_hab); 144 144 145 145 // OK, hook is armed 146 146 pmkbdhk_installed = TRUE; … … 155 155 // call the terminator function 156 156 pfnHookTerm(); 157 157 158 158 // OK, hook is disarmed 159 pmkbdhk_installed = TRUE;159 pmkbdhk_installed = FALSE; 160 160 } 161 161 162 162 // unload the dll 163 163 if (NULLHANDLE != hmodPMKBDHK) … … 168 168 dprintf(("USER32: pmkbdhk_terminate() failed rc=%d\n", 169 169 rc)); 170 170 171 171 hmodPMKBDHK = NULLHANDLE; 172 172 } … … 215 215 if (FALSE == InitPM()) 216 216 return 0UL; 217 217 218 218 // try to install the keyboard hook 219 219 pmkbdhk_initialize(hab); … … 229 229 230 230 break; 231 232 231 232 233 233 case 1 : 234 234 if(hInstanceUser32) { … … 250 250 { 251 251 dprintf(("user32 exit\n")); 252 252 253 253 // try to unistall the keyboard hook 254 254 pmkbdhk_terminate();
Note:
See TracChangeset
for help on using the changeset viewer.