Changeset 21246 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Jul 6, 2009 11:24:43 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49569
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk
r19644 r21246 27 27 endif 28 28 29 # Build special VBoxService version for NT4. 30 ifeq ($(KBUILD_TARGET), win) 31 PROGRAMS.x86 += VBoxServiceNT 32 endif 33 29 34 # 30 # VBoxService .exe35 # VBoxService 31 36 # 32 37 VBoxService_TEMPLATE = VBOXGUESTR3EXE … … 66 71 endif 67 72 73 # 74 # VBoxServiceNT - NT version of VBoxService (x86 only). 75 # 76 VBoxServiceNT_TEMPLATE = VBOXGUESTR3EXE 77 VBoxServiceNT_DEFS = VBOXSERVICE_TIMESYNC 78 VBoxServiceNT_DEFS += _WIN32_WINNT=0x0400 _UNICODE UNICODE TARGET_NT4 79 ifdef VBOX_WITH_GUEST_PROPS 80 VBoxServiceNT_DEFS += VBOX_WITH_GUEST_PROPS VBOXSERVICE_VMINFO 81 endif 82 VBoxServiceNT_SOURCES = \ 83 VBoxService.cpp \ 84 VBoxServiceTimeSync.cpp \ 85 VBoxServiceUtils.cpp \ 86 VBoxService-win.rc \ 87 VBoxService-win.cpp 88 ifdef VBOX_WITH_GUEST_PROPS 89 VBoxServiceNT_SOURCES += \ 90 VBoxServiceVMInfo.cpp \ 91 VBoxServiceVMInfo-win.cpp 92 endif 93 VBoxServiceNT_LIBS = \ 94 $(VBOX_LIB_IPRT_GUEST_R3) \ 95 $(VBOX_LIB_VBGL_R3) \ 96 $(VBOX_LIB_IPRT_GUEST_R3) 97 68 98 # The icon is configurable. 69 99 VBoxService-win.rc_INCS = $(PATH_VBoxService) -
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) -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp
r21227 r21246 44 44 * Global Variables * 45 45 *******************************************************************************/ 46 /** Function prototypes for dynamic loading. */ 47 extern fnWTSGetActiveConsoleSessionId g_pfnWTSGetActiveConsoleSessionId; 48 /** The vminfo interval (millseconds). */ 49 uint32_t g_VMInfoLoggedInUsersCount = 0; 50 51 46 #ifndef TARGET_NT4 47 /** Function prototypes for dynamic loading. */ 48 extern fnWTSGetActiveConsoleSessionId g_pfnWTSGetActiveConsoleSessionId; 49 /** The vminfo interval (millseconds). */ 50 uint32_t g_VMInfoLoggedInUsersCount = 0; 51 #endif 52 53 54 #ifndef TARGET_NT4 52 55 /* Function GetLUIDsFromProcesses() written by Stefan Kuhr. */ 53 56 DWORD VboxServiceVMInfoWinGetLUIDsFromProcesses(PLUID *ppLuid) … … 325 328 } 326 329 330 #endif /* TARGET_NT4 */ 331 327 332 int VboxServiceWinGetAddsVersion(uint32_t uiClientID) 328 333 { … … 336 341 DWORD dwType = 0; 337 342 343 VBoxServiceVerbose(3, "Guest Additions version lookup: Looking up ...\n"); 344 338 345 /* Check the new path first. */ 339 346 rc = RegOpenKeyExA (HKEY_LOCAL_MACHINE, "SOFTWARE\\Sun\\VirtualBox Guest Additions", 0, KEY_READ, &hKey); 340 if ((rc != ERROR_SUCCESS) && (rc != ERROR_FILE_NOT_FOUND)) 341 { 347 if (rc != ERROR_SUCCESS) 348 { 349 VBoxServiceVerbose(3, "Guest Additions version lookup: Looking in xVM key ...\n"); 350 342 351 /* New path does not exist, check the old one ... */ 343 352 rc = RegOpenKeyExA (HKEY_LOCAL_MACHINE, "SOFTWARE\\Sun\\xVM VirtualBox Guest Additions", 0, KEY_READ, &hKey); 344 if ( (rc != ERROR_SUCCESS) && (rc != ERROR_FILE_NOT_FOUND))353 if (rc != ERROR_SUCCESS) 345 354 { 346 355 /* Nothing seems to exist, print some warning. */ … … 349 358 } 350 359 } 360 361 VBoxServiceVerbose(3, "Guest Additions version lookup: Key: 0x%p, RC: %d\n", hKey, rc); 351 362 352 363 /* Installation directory. */ … … 409 420 410 421 /* The file information table. */ 422 #ifndef TARGET_NT4 411 423 VBOXSERVICEVMINFOFILE vboxFileInfoTable[] = 412 424 { … … 436 448 } 437 449 }; 450 #else /* File lookup for NT4. */ 451 VBOXSERVICEVMINFOFILE vboxFileInfoTable[] = 452 { 453 { szSysDir, TEXT("VBoxControl.exe"), }, 454 { szSysDir, TEXT("VBoxHook.dll"), }, 455 { szSysDir, TEXT("VBoxDisp.dll"), }, 456 { szSysDir, TEXT("VBoxService.exe"), }, 457 { szSysDir, TEXT("VBoxTray.exe"), }, 458 459 { szDriversDir, TEXT("VBoxGuestNT.sys"), }, 460 { szDriversDir, TEXT("VBoxMouseNT.sys"), }, 461 { szDriversDir, TEXT("VBoxVideo.sys"), }, 462 463 { 464 NULL 465 } 466 }; 467 #endif 438 468 439 469 PVBOXSERVICEVMINFOFILE pTable = vboxFileInfoTable; -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r21218 r21246 186 186 187 187 #ifdef RT_OS_WINDOWS 188 #ifndef TARGET_NT4 188 189 PLUID pSessions = NULL; 189 190 ULONG ulCount = 0; … … 228 229 229 230 ::LsaFreeReturnBuffer(pSessions); 231 #endif /* TARGET_NT4 */ 230 232 #else 231 233 utmp* ut_user;
Note:
See TracChangeset
for help on using the changeset viewer.