Changeset 21246 in vbox for trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp
- Timestamp:
- Jul 6, 2009 11:24:43 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49569
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp
r21230 r21246 262 262 } 263 263 264 #ifdef TARGET_NT4 265 VOID WINAPI VBoxServiceWinCtrlHandler (DWORD dwControl) 266 #else 264 267 DWORD WINAPI VBoxServiceWinCtrlHandler (DWORD dwControl, 265 268 DWORD dwEventType, 266 269 LPVOID lpEventData, 267 270 LPVOID lpContext) 271 #endif 268 272 { 269 273 DWORD rc = NO_ERROR; 270 274 271 VBoxServiceVerbose(2, "Control handler: Control=%ld, EventType=%ld\n", dwControl, dwEventType); 275 VBoxServiceVerbose(2, "Control handler: Control=%ld\n", dwControl); 276 #ifndef TARGET_NT4 277 VBoxServiceVerbose(2, "Control handler: EventType=%ld\n", dwEventType); 278 #endif 279 272 280 switch (dwControl) 273 281 { … … 290 298 case SERVICE_CONTROL_SESSIONCHANGE: /* Only Win XP and up. */ 291 299 300 #ifndef TARGET_NT4 292 301 switch (dwEventType) 293 302 { 294 295 303 /*case WTS_SESSION_LOGON: 296 304 VBoxServiceVerbose(2, "A user has logged on to the session.\n"); … … 300 308 VBoxServiceVerbose(2, "A user has logged off from the session.\n"); 301 309 break;*/ 302 303 310 default: 304 311 break; 305 312 } 313 #endif /* TARGET_NT4 */ 306 314 break; 307 315 … … 312 320 break; 313 321 } 322 323 #ifndef TARGET_NT4 314 324 return rc; 325 #endif 315 326 } 316 327 … … 320 331 321 332 VBoxServiceVerbose(2, "Registering service control handler ...\n"); 333 #ifdef TARGET_NT4 334 g_hWinServiceStatus = RegisterServiceCtrlHandler (VBOXSERVICE_NAME, VBoxServiceWinCtrlHandler); 335 #else 322 336 g_hWinServiceStatus = RegisterServiceCtrlHandlerEx (VBOXSERVICE_NAME, VBoxServiceWinCtrlHandler, NULL); 337 #endif 323 338 324 339 if (NULL == g_hWinServiceStatus)
Note:
See TracChangeset
for help on using the changeset viewer.