Changeset 35907 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Feb 9, 2011 11:20:31 AM (14 years ago)
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxHelpers.cpp
r35887 r35907 28 28 29 29 30 int hlpReportStatus(VBoxGuest StatusCurrentstatusCurrent)31 { 32 int rc = VbglR3ReportAdditionsStatus(VBoxGuest StatusFacility_VBoxTrayClient,30 int hlpReportStatus(VBoxGuestFacilityStatus statusCurrent) 31 { 32 int rc = VbglR3ReportAdditionsStatus(VBoxGuestFacilityType_VBoxTrayClient, 33 33 statusCurrent, 34 34 0 /* Flags */); -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxHelpers.h
r35863 r35907 27 27 #endif /* !DEBUG_DISPLAY_CHANGE */ 28 28 29 extern int hlpReportStatus(VBoxGuest StatusCurrentstatusCurrent);29 extern int hlpReportStatus(VBoxGuestFacilityStatus statusCurrent); 30 30 extern void hlpReloadCursor(void); 31 31 extern void hlpResizeRect(RECTL *paRects, unsigned nRects, unsigned uPrimary, unsigned uResized, int iNewWidth, int iNewHeight); -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r35863 r35907 583 583 { 584 584 /* Report the host that we're up and running! */ 585 rc = hlpReportStatus(VBoxGuestStatusCurrent_Active);585 hlpReportStatus(VBoxGuestFacilityStatus_Active); 586 586 } 587 587 } … … 685 685 } 686 686 687 if (RT_FAILURE(rc))688 {689 CloseHandle (hMutexAppRunning);690 hMutexAppRunning = NULL;691 return 1;692 }693 694 687 if (RT_SUCCESS(rc)) 695 688 { … … 697 690 ghInstance = hInstance; 698 691 699 rc = hlpReportStatus(VBoxGuestStatusCurrent_Init); 692 hlpReportStatus(VBoxGuestFacilityStatus_Init); 693 rc = vboxTrayCreateToolWindow(); 700 694 if (RT_SUCCESS(rc)) 701 695 { 702 rc = vboxTray CreateToolWindow();696 rc = vboxTraySetupSeamless(); 703 697 if (RT_SUCCESS(rc)) 704 698 { 705 rc = vboxTraySetupSeamless(); 699 Log(("VBoxTray: Init successful\n")); 700 rc = vboxTrayServiceMain(); 706 701 if (RT_SUCCESS(rc)) 707 { 708 Log(("VBoxTray: Init successful\n")); 709 rc = vboxTrayServiceMain(); 710 hlpReportStatus(VBoxGuestStatusCurrent_Terminating); 711 vboxTrayShutdownSeamless(); 712 } 713 vboxTrayDestroyToolWindow(); 714 } 715 rc = hlpReportStatus(VBoxGuestStatusCurrent_Inactive); 716 } 717 } 718 else 719 Log(("VBoxTray: Could not report VBoxTray status \"Init\", rc=%Rrc\n", rc)); 702 hlpReportStatus(VBoxGuestFacilityStatus_Terminating); 703 vboxTrayShutdownSeamless(); 704 } 705 vboxTrayDestroyToolWindow(); 706 } 707 if (RT_SUCCESS(rc)) 708 hlpReportStatus(VBoxGuestFacilityStatus_Terminated); 709 } 710 720 711 if (RT_FAILURE(rc)) 721 LogRel(("VBoxTray: Error while starting, rc=%Rrc\n", rc)); 712 { 713 LogRel(("VBoxTray: Error while starting, rc=%Rrc\n", rc)); 714 hlpReportStatus(VBoxGuestFacilityStatus_Failed); 715 } 722 716 LogRel(("VBoxTray: Ended\n")); 717 vboxTrayCloseBaseDriver(); 723 718 724 719 /* Release instance mutex. */ … … 730 725 731 726 VbglR3Term(); 732 return 0;727 return RT_SUCCESS(rc) ? 0 : 1; 733 728 } 734 729 -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest2.cpp
r32435 r35907 5 5 6 6 /* 7 * Copyright (C) 201 0Oracle Corporation7 * Copyright (C) 2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 116 116 if (RT_SUCCESS(rc)) 117 117 { 118 pReq2->guestStatus.facility = VBoxGuest StatusFacility_VBoxGuestDriver;118 pReq2->guestStatus.facility = VBoxGuestFacilityType_VBoxGuestDriver; 119 119 pReq2->guestStatus.status = fActive ? 120 VBoxGuest StatusCurrent_Active121 : VBoxGuest StatusCurrent_Inactive;120 VBoxGuestFacilityStatus_Active 121 : VBoxGuestFacilityStatus_Inactive; 122 122 pReq2->guestStatus.flags = 0; 123 123 rc = VbglGRPerform(&pReq2->header); -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAdditions.cpp
r30959 r35907 147 147 * @param fReserved Reserved for future use (what?). 148 148 */ 149 VBGLR3DECL(int) VbglR3ReportAdditionsStatus(VBoxGuest StatusFacilityenmFacility,150 VBoxGuest StatusCurrentenmStatusCurrent,149 VBGLR3DECL(int) VbglR3ReportAdditionsStatus(VBoxGuestFacilityType enmFacility, 150 VBoxGuestFacilityStatus enmStatusCurrent, 151 151 uint32_t fReserved) 152 152 { -
trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
r35080 r35907 229 229 230 230 /** 231 * Reports the current VBoxService status to the host. 232 * 233 * @return IPRT status code. 234 * @param enmStatus Status to report to the host. 235 */ 236 int VBoxServiceReportStatus(VBoxGuestFacilityStatus enmStatus) 237 { 238 /* Report the host that we're up and running! */ 239 int rc = VbglR3ReportAdditionsStatus(VBoxGuestFacilityType_VBoxService, 240 enmStatus, 0 /* Flags */); 241 if (RT_FAILURE(rc)) 242 VBoxServiceError("Could not report VBoxService status (%u), rc=%Rrc\n", enmStatus, rc); 243 return rc; 244 } 245 246 247 /** 231 248 * Gets a 32-bit value argument. 232 249 * … … 310 327 { 311 328 int rc; 329 330 VBoxServiceReportStatus(VBoxGuestFacilityStatus_Init); 312 331 313 332 /* … … 372 391 VBoxServiceVerbose(1, "All services started.\n"); 373 392 else 393 { 374 394 VBoxServiceError("An error occcurred while the services!\n"); 395 VBoxServiceReportStatus(VBoxGuestFacilityStatus_Failed); 396 } 375 397 return rc; 376 398 } … … 386 408 { 387 409 int rc = VINF_SUCCESS; 410 411 VBoxServiceReportStatus(VBoxGuestFacilityStatus_Terminating); 388 412 389 413 /* … … 445 469 446 470 VBoxServiceVerbose(2, "Stopping services returned: rc=%Rrc\n", rc); 471 VBoxServiceReportStatus(RT_SUCCESS(rc) 472 ? VBoxGuestFacilityStatus_Paused : VBoxGuestFacilityStatus_Failed); 447 473 return rc; 448 474 } … … 456 482 int rc; 457 483 458 /* Report the host that we're up and running! */ 459 rc = VbglR3ReportAdditionsStatus(VBoxGuestStatusFacility_VBoxService, 460 VBoxGuestStatusCurrent_Active, 461 0 /* Flags */); 462 if (RT_FAILURE(rc)) 463 VBoxServiceError("Could not report facility (%u) status %u, rc=%Rrc\n", 464 VBoxGuestStatusFacility_VBoxService, VBoxGuestStatusCurrent_Active, rc); 484 VBoxServiceReportStatus(VBoxGuestFacilityStatus_Active); 465 485 466 486 #ifdef RT_OS_WINDOWS … … 557 577 #endif 558 578 579 VBoxServiceReportStatus(VBoxGuestFacilityStatus_PreInit); 580 559 581 /* 560 582 * Do pre-init of services. … … 564 586 rc = g_aServices[j].pDesc->pfnPreInit(); 565 587 if (RT_FAILURE(rc)) 588 { 589 VBoxServiceReportStatus(VBoxGuestFacilityStatus_Failed); 566 590 return VBoxServiceError("Service '%s' failed pre-init: %Rrc\n", g_aServices[j].pDesc->pszName, rc); 591 } 567 592 } 568 593 #ifdef RT_OS_WINDOWS … … 768 793 769 794 VBoxServiceVerbose(0, "Ended.\n"); 795 VBoxServiceReportStatus(VBoxGuestFacilityStatus_Terminated); 770 796 return rcExit; 771 797 }
Note:
See TracChangeset
for help on using the changeset viewer.