Changeset 32283 in vbox
- Timestamp:
- Sep 7, 2010 12:24:57 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxGuest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-pnp.cpp
r32282 r32283 237 237 } 238 238 } 239 /* 240 #ifdef VBOX_WITH_HGCM 241 if (NT_SUCCESS(rc)) 242 { 243 int vrc = VBoxGuestHGCMInitCommunication(pDevExt, vboxguestwinVersionToOSType(g_winVersion)); 244 if (RT_FAILURE(vrc)) 245 rc = STATUS_UNSUCCESSFUL; 246 } 247 #endif 248 */ 239 249 240 if (NT_SUCCESS(rc)) 250 241 { … … 547 538 { 548 539 Log(("VBoxGuest::vboxguestwinGuestPower: Returning from hibernation!\n")); 549 #ifdef VBOX_WITH_HGCM 550 int rc = VBoxGuestHGCMInitCommunication(pDevExt, vboxguestwinVersionToOSType(g_winVersion)); 540 int rc = VBoxGuestReinitDevExtAfterHibernation(pDevExt, vboxguestwinVersionToOSType(g_winVersion)); 551 541 if (RT_FAILURE(rc)) 552 Log(("VBoxGuest::vboxguestwinGuestPower: Cannot re-init HGCM chain, rc = %d!\n", rc)); 553 #endif 542 Log(("VBoxGuest::vboxguestwinGuestPower: Cannot re-init VMMDev chain, rc = %d!\n", rc)); 554 543 } 555 544 } -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r32275 r32283 40 40 #if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) 41 41 # include "revision-generated.h" 42 #endif 43 #ifdef RT_OS_WINDOWS 44 # ifndef CTL_CODE 45 # include <Windows.h> 46 # endif 42 47 #endif 43 48 … … 440 445 441 446 /** 447 * Helper to reinit the VBoxVMM communication after hibernation. 448 * 449 * @returns VBox status code. 450 * @param pDevExt The device extension. 451 * @param enmOSType The OS type. 452 */ 453 int VBoxGuestReinitDevExtAfterHibernation(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE enmOSType) 454 { 455 int rc = VBoxGuestReportGuestInfo(enmOSType); 456 if (RT_SUCCESS(rc)) 457 { 458 rc = VBoxGuestReportDriverStatus(true /* Driver is active */); 459 if (RT_FAILURE(rc)) 460 Log(("VBoxGuest::VBoxGuestReinitDevExtAfterHibernation: could not report guest driver status, rc=%Rrc\n", rc)); 461 } 462 else 463 Log(("VBoxGuest::VBoxGuestReinitDevExtAfterHibernation: could not report guest information to host, rc=%Rrc\n", rc)); 464 Log(("VBoxGuest::VBoxGuestReinitDevExtAfterHibernation: returned with rc=%Rrc\n", rc)); 465 return rc; 466 } 467 468 469 /** 442 470 * Inflate/deflate the balloon by one chunk. 443 471 * … … 1564 1592 1565 1593 1566 /**1567 * Helper to reinit the VBoxVMM communication after hibernation.1568 *1569 * @returns VBox status code.1570 * @param pDevExt The device extension.1571 * @param enmOSType The OS type.1572 *1573 * @todo r=bird: This is a misnomer, it's related to VMMDev communication in1574 * general, not only HGCM. Further, it's reinit only. Init can only1575 * be done VBoxGuestInitDevExt. A better name would be1576 * VBoxGuestReinitDevExtAfterHibernation.1577 */1578 int VBoxGuestHGCMInitCommunication(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE enmOSType)1579 {1580 int rc = VBoxGuestReportGuestInfo(enmOSType);1581 if (RT_SUCCESS(rc))1582 {1583 rc = VBoxGuestReportDriverStatus(true /* Driver is active */);1584 if (RT_FAILURE(rc))1585 Log(("VBoxGuest::VBoxGuestInitHGCMCommunication: could not report guest driver status, rc=%Rrc\n", rc));1586 }1587 else1588 Log(("VBoxGuest::VBoxGuestInitHGCMCommunication: could not report guest information to host, rc=%Rrc\n", rc));1589 Log(("VBoxGuest::VBoxGuestInitHGCMCommunication: returned with rc=%Rrc\n", rc));1590 return rc;1591 }1592 1593 1594 1594 static int VBoxGuestCommonIOCtl_HGCMConnect(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, 1595 1595 VBoxGuestHGCMConnectInfo *pInfo, size_t *pcbDataReturned) -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
r32266 r32283 213 213 214 214 int VBoxGuestInitDevExt(PVBOXGUESTDEVEXT pDevExt, uint16_t IOPortBase, void *pvMMIOBase, uint32_t cbMMIO, VBOXOSTYPE enmOSType, uint32_t fEvents); 215 bool VBoxGuestCommonISR(PVBOXGUESTDEVEXT pDevExt); 215 216 void VBoxGuestDeleteDevExt(PVBOXGUESTDEVEXT pDevExt); 216 bool VBoxGuestCommonISR(PVBOXGUESTDEVEXT pDevExt);217 int VBoxGuestReinitDevExtAfterHibernation(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE enmOSType); 217 218 int VBoxGuestSetGuestCapabilities(uint32_t fOr, uint32_t fNot); 218 219 … … 220 221 int VBoxGuestCreateKernelSession(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION *ppSession); 221 222 void VBoxGuestCloseSession(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession); 222 223 #ifdef VBOX_WITH_HGCM224 int VBoxGuestHGCMInitCommunication(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE enmOSType);225 #endif226 223 227 224 int VBoxGuestCommonIOCtlFast(unsigned iFunction, PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession);
Note:
See TracChangeset
for help on using the changeset viewer.