Changeset 75853 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Nov 30, 2018 7:26:42 PM (6 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r75823 r75853 36 36 #include "ConsoleImpl.h" 37 37 #include "DisplayImpl.h" 38 #ifdef VBOX_WITH_ GUEST_CONTROL38 #ifdef VBOX_WITH_DRAG_AND_DROP 39 39 # include "GuestImpl.h" 40 #endif41 #ifdef VBOX_WITH_DRAG_AND_DROP42 40 # include "GuestDnDPrivate.h" 43 41 #endif … … 3194 3192 */ 3195 3193 rc = i_configGuestProperties(this); 3196 #endif3197 3198 #ifdef VBOX_WITH_GUEST_CONTROL3199 /*3200 * Guest control service.3201 */3202 rc = i_configGuestControl(this);3203 3194 #endif 3204 3195 … … 6235 6226 } 6236 6227 6237 /**6238 * Set up the Guest Control service.6239 */6240 /* static */ int Console::i_configGuestControl(void *pvConsole)6241 {6242 #ifdef VBOX_WITH_GUEST_CONTROL6243 AssertReturn(pvConsole, VERR_INVALID_POINTER);6244 ComObjPtr<Console> pConsole = static_cast<Console *>(pvConsole);6245 6246 /* Load the service */6247 int rc = pConsole->m_pVMMDev->hgcmLoadService("VBoxGuestControlSvc", "VBoxGuestControlSvc");6248 6249 if (RT_FAILURE(rc))6250 {6251 LogRel(("VBoxGuestControlSvc is not available. rc = %Rrc\n", rc));6252 /* That is not a fatal failure. */6253 rc = VINF_SUCCESS;6254 }6255 else6256 {6257 HGCMSVCEXTHANDLE hDummy;6258 rc = HGCMHostRegisterServiceExtension(&hDummy, "VBoxGuestControlSvc",6259 &Guest::i_notifyCtrlDispatcher,6260 pConsole->i_getGuest());6261 if (RT_FAILURE(rc))6262 Log(("Cannot register VBoxGuestControlSvc extension!\n"));6263 else6264 LogRel(("Guest Control service loaded\n"));6265 }6266 6267 return rc;6268 #else /* !VBOX_WITH_GUEST_CONTROL */6269 return VERR_NOT_SUPPORTED;6270 #endif /* !VBOX_WITH_GUEST_CONTROL */6271 } -
trunk/src/VBox/Main/src-client/HGCM.cpp
r75774 r75853 118 118 119 119 PUVM m_pUVM; 120 PPDMIHGCMPORT m_pHgcmPort; 120 121 121 122 /** @name Statistics … … 130 131 * Main HGCM thread methods. 131 132 */ 132 int instanceCreate(const char *pszServiceLibrary, const char *pszServiceName, PUVM pUVM );133 int instanceCreate(const char *pszServiceLibrary, const char *pszServiceName, PUVM pUVM, PPDMIHGCMPORT pHgcmPort); 133 134 void instanceDestroy(void); 134 135 135 136 int saveClientState(uint32_t u32ClientId, PSSMHANDLE pSSM); 136 int loadClientState(uint32_t u32ClientId, PSSMHANDLE pSSM );137 int loadClientState(uint32_t u32ClientId, PSSMHANDLE pSSM, uint32_t uVersion); 137 138 138 139 HGCMService(); … … 150 151 static DECLCALLBACK(int) svcHlpInfoDeregister(void *pvInstance, const char *pszName); 151 152 static DECLCALLBACK(uint32_t) svcHlpGetRequestor(VBOXHGCMCALLHANDLE hCall); 153 static DECLCALLBACK(uint64_t) svcHlpGetVMMDevSessionId(void *pvInstance); 152 154 153 155 public: … … 156 158 * Main HGCM thread methods. 157 159 */ 158 static int LoadService(const char *pszServiceLibrary, const char *pszServiceName, PUVM pUVM );160 static int LoadService(const char *pszServiceLibrary, const char *pszServiceName, PUVM pUVM, PPDMIHGCMPORT pHgcmPort); 159 161 void UnloadService(bool fUvmIsInvalid); 160 162 … … 168 170 169 171 static int SaveState(PSSMHANDLE pSSM); 170 static int LoadState(PSSMHANDLE pSSM );172 static int LoadState(PSSMHANDLE pSSM, uint32_t uVersion); 171 173 172 174 int CreateAndConnectClient(uint32_t *pu32ClientIdOut, uint32_t u32ClientIdIn, uint32_t fRequestor, bool fRestoring); … … 199 201 { 200 202 public: 201 HGCMClient() : HGCMObject(HGCMOBJ_CLIENT), pService(NULL), 202 pvData(NULL) {}; 203 HGCMClient(uint32_t a_fRequestor) 204 : HGCMObject(HGCMOBJ_CLIENT) 205 , pService(NULL) 206 , pvData(NULL) 207 , fRequestor(a_fRequestor) 208 {} 203 209 ~HGCMClient(); 204 210 … … 210 216 /** Client specific data. */ 211 217 void *pvData; 218 219 /** The requestor flags this client was created with. 220 * @sa VMMDevRequestHeader::fRequestor */ 221 uint32_t fRequestor; 222 223 private: /* none of this: */ 224 HGCMClient(); 225 HGCMClient(HGCMClient const &); 226 HGCMClient &operator=(HGCMClient const &); 212 227 }; 213 228 … … 215 230 { 216 231 if (pService->SizeOfClient() > 0) 232 { 217 233 RTMemFree(pvData); 218 } 234 pvData = NULL; 235 } 236 } 237 219 238 220 239 int HGCMClient::Init(HGCMService *pSvc) … … 261 280 #endif 262 281 m_hExtension (NULL), 263 m_pUVM (NULL) 282 m_pUVM (NULL), 283 m_pHgcmPort (NULL) 264 284 { 265 285 RT_ZERO(m_fntable); … … 469 489 { 470 490 public: 491 PSSMHANDLE pSSM; 492 uint32_t uVersion; 471 493 uint32_t u32ClientId; 472 PSSMHANDLE pSSM;473 494 }; 474 495 … … 684 705 if (pClient) 685 706 { 686 if (pSvc->m_fntable.pfnLoadState) 707 /* fRequestor: Restored by the message sender already. */ 708 bool fHaveClientState = pSvc->m_fntable.pfnLoadState != NULL; 709 if (pMsg->uVersion > HGCM_SAVED_STATE_VERSION_V2) 710 rc = SSMR3GetBool(pMsg->pSSM, &fHaveClientState); 711 else 712 rc = VINF_SUCCESS; 713 if (RT_SUCCESS(rc) ) 687 714 { 688 rc = pSvc->m_fntable.pfnLoadState(pSvc->m_fntable.pvService, pMsg->u32ClientId, 689 HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM); 715 if (pSvc->m_fntable.pfnLoadState) 716 rc = pSvc->m_fntable.pfnLoadState(pSvc->m_fntable.pvService, pMsg->u32ClientId, 717 HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM, 718 fHaveClientState ? pMsg->uVersion : 0); 719 else 720 AssertLogRelStmt(!fHaveClientState, rc = VERR_INTERNAL_ERROR_5); 690 721 } 691 692 722 hgcmObjDereference(pClient); 693 723 } … … 710 740 if (pClient) 711 741 { 712 if (pSvc->m_fntable.pfnSaveState) 742 SSMR3PutU32(pMsg->pSSM, pClient->fRequestor); /* Quicker to save this here than in the message sender. */ 743 rc = SSMR3PutBool(pMsg->pSSM, pSvc->m_fntable.pfnSaveState != NULL); 744 if (RT_SUCCESS(rc) && pSvc->m_fntable.pfnSaveState) 713 745 { 714 746 g_fSaveState = true; … … 893 925 } 894 926 895 896 927 /** 897 928 * @interface_method_impl{VBOXHGCMSVCHELPERS,pfnGetRequestor} … … 909 940 910 941 return pHgcmPort->pfnGetRequestor(pHgcmPort, pCmd); 942 } 943 944 /** 945 * @interface_method_impl{VBOXHGCMSVCHELPERS,pfnGetVMMDevSessionId} 946 */ 947 /* static */ DECLCALLBACK(uint64_t) HGCMService::svcHlpGetVMMDevSessionId(void *pvInstance) 948 { 949 HGCMService *pService = static_cast <HGCMService *>(pvInstance); 950 AssertPtrReturn(pService, UINT64_MAX); 951 952 PPDMIHGCMPORT pHgcmPort = pService->m_pHgcmPort; 953 AssertPtrReturn(pHgcmPort, UINT64_MAX); 954 955 return pHgcmPort->pfnGetVMMDevSessionId(pHgcmPort); 911 956 } 912 957 … … 933 978 */ 934 979 935 int HGCMService::instanceCreate(const char *pszServiceLibrary, const char *pszServiceName, PUVM pUVM )980 int HGCMService::instanceCreate(const char *pszServiceLibrary, const char *pszServiceName, PUVM pUVM, PPDMIHGCMPORT pHgcmPort) 936 981 { 937 982 LogFlowFunc(("name %s, lib %s\n", pszServiceName, pszServiceLibrary)); … … 964 1009 else 965 1010 { 1011 m_pUVM = pUVM; 1012 m_pHgcmPort = pHgcmPort; 1013 966 1014 /* Register statistics: */ 967 m_pUVM = pUVM;968 1015 STAMR3RegisterFU(pUVM, &m_StatHandleMsg, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, 969 1016 "Message handling", "/HGCM/%s/Msg", pszServiceName); 970 1017 971 1018 /* Initialize service helpers table. */ 972 m_svcHelpers.pfnCallComplete = svcHlpCallComplete; 973 m_svcHelpers.pvInstance = this; 974 m_svcHelpers.pfnDisconnectClient = svcHlpDisconnectClient; 975 m_svcHelpers.pfnIsCallRestored = svcHlpIsCallRestored; 976 m_svcHelpers.pfnStamRegisterV = svcHlpStamRegisterV; 977 m_svcHelpers.pfnStamDeregisterV = svcHlpStamDeregisterV; 978 m_svcHelpers.pfnInfoRegister = svcHlpInfoRegister; 979 m_svcHelpers.pfnInfoDeregister = svcHlpInfoDeregister; 980 m_svcHelpers.pfnGetRequestor = svcHlpGetRequestor; 1019 m_svcHelpers.pfnCallComplete = svcHlpCallComplete; 1020 m_svcHelpers.pvInstance = this; 1021 m_svcHelpers.pfnDisconnectClient = svcHlpDisconnectClient; 1022 m_svcHelpers.pfnIsCallRestored = svcHlpIsCallRestored; 1023 m_svcHelpers.pfnStamRegisterV = svcHlpStamRegisterV; 1024 m_svcHelpers.pfnStamDeregisterV = svcHlpStamDeregisterV; 1025 m_svcHelpers.pfnInfoRegister = svcHlpInfoRegister; 1026 m_svcHelpers.pfnInfoDeregister = svcHlpInfoDeregister; 1027 m_svcHelpers.pfnGetRequestor = svcHlpGetRequestor; 1028 m_svcHelpers.pfnGetVMMDevSessionId = svcHlpGetVMMDevSessionId; 981 1029 982 1030 /* Execute the load request on the service thread. */ … … 1022 1070 STAMR3DeregisterF(m_pUVM, "/HGCM/%s/*", m_pszSvcName); 1023 1071 m_pUVM = NULL; 1072 m_pHgcmPort = NULL; 1024 1073 1025 1074 RTStrFree(m_pszSvcLibrary); … … 1051 1100 } 1052 1101 1053 int HGCMService::loadClientState(uint32_t u32ClientId, PSSMHANDLE pSSM )1102 int HGCMService::loadClientState(uint32_t u32ClientId, PSSMHANDLE pSSM, uint32_t uVersion) 1054 1103 { 1055 1104 LogFlowFunc(("%s\n", m_pszSvcName)); … … 1062 1111 HGCMMsgLoadSaveStateClient *pMsg = (HGCMMsgLoadSaveStateClient *)pCoreMsg; 1063 1112 1113 pMsg->pSSM = pSSM; 1114 pMsg->uVersion = uVersion; 1064 1115 pMsg->u32ClientId = u32ClientId; 1065 pMsg->pSSM = pSSM;1066 1116 1067 1117 rc = hgcmMsgSend(pMsg); … … 1075 1125 /** The method creates a service and references it. 1076 1126 * 1077 * @param pszServiceLibrary The library to be loaded. 1078 * @param pszServiceName The name of the service. 1079 * @param pUVM The user mode VM handle (for statistics and such). 1080 * @return VBox rc. 1081 * @thread main HGCM 1082 */ 1083 /* static */ int HGCMService::LoadService(const char *pszServiceLibrary, const char *pszServiceName, PUVM pUVM) 1127 * @param pszServiceLibrary The library to be loaded. 1128 * @param pszServiceName The name of the service. 1129 * @param pUVM The user mode VM handle (for statistics and such). 1130 * @param pHgcmPort The VMMDev HGCM port interface. 1131 * 1132 * @return VBox rc. 1133 * @thread main HGCM 1134 */ 1135 /* static */ int HGCMService::LoadService(const char *pszServiceLibrary, const char *pszServiceName, 1136 PUVM pUVM, PPDMIHGCMPORT pHgcmPort) 1084 1137 { 1085 1138 LogFlowFunc(("lib %s, name = %s, pUVM = %p\n", pszServiceLibrary, pszServiceName, pUVM)); … … 1108 1161 { 1109 1162 /* Load the library and call the initialization entry point. */ 1110 rc = pSvc->instanceCreate(pszServiceLibrary, pszServiceName, pUVM );1163 rc = pSvc->instanceCreate(pszServiceLibrary, pszServiceName, pUVM, pHgcmPort); 1111 1164 1112 1165 if (RT_SUCCESS(rc)) … … 1151 1204 1152 1205 if (fUvmIsInvalid) 1206 { 1153 1207 m_pUVM = NULL; 1208 m_pHgcmPort = NULL; 1209 } 1154 1210 1155 1211 /* Remove the service from the list. */ … … 1354 1410 Log(("client id 0x%08X\n", u32ClientId)); 1355 1411 1356 /* Save the client id. */1412 /* Save the client id. (fRequestor is saved via SVC_MSG_SAVESTATE for convenience.) */ 1357 1413 rc = SSMR3PutU32(pSSM, u32ClientId); 1358 1414 AssertRCReturn(rc, rc); … … 1371 1427 /** The method loads saved HGCM state. 1372 1428 * 1373 * @param pSSM The saved state context. 1429 * @param pSSM The saved state handle. 1430 * @param uVersion The state version being loaded. 1374 1431 * @return VBox rc. 1375 1432 * @thread main HGCM 1376 1433 */ 1377 /* static */ int HGCMService::LoadState(PSSMHANDLE pSSM )1434 /* static */ int HGCMService::LoadState(PSSMHANDLE pSSM, uint32_t uVersion) 1378 1435 { 1379 1436 /* Restore handle count to avoid client id conflicts. */ … … 1424 1481 while (cClients--) 1425 1482 { 1426 /* Get the client id. */ 1483 /* Get the client ID and fRequest (convieniently save via SVC_MSG_SAVESTATE 1484 but restored here in time for calling CreateAndConnectClient). */ 1427 1485 uint32_t u32ClientId; 1428 1486 rc = SSMR3GetU32(pSSM, &u32ClientId); 1429 uint32_t fRequestor = VMMDEV_REQUESTOR_LEGACY; /** @todo save/restore fRequestor. */ 1430 if (RT_FAILURE(rc)) 1431 { 1432 pSvc->ReleaseService(); 1433 AssertFailed(); 1434 return rc; 1435 } 1487 uint32_t fRequestor = VMMDEV_REQUESTOR_LEGACY; 1488 if (RT_SUCCESS(rc) && uVersion > HGCM_SAVED_STATE_VERSION_V2) 1489 rc = SSMR3GetU32(pSSM, &fRequestor); 1490 AssertLogRelMsgRCReturnStmt(rc, ("rc=%Rrc, %s\n", rc, szServiceName), pSvc->ReleaseService(), rc); 1436 1491 1437 1492 /* Connect the client. */ 1438 1493 rc = pSvc->CreateAndConnectClient(NULL, u32ClientId, fRequestor, true /*fRestoring*/); 1439 if (RT_FAILURE(rc)) 1440 { 1441 pSvc->ReleaseService(); 1442 AssertLogRelMsgFailed(("rc=%Rrc %s\n", rc, szServiceName)); 1443 return rc; 1444 } 1494 AssertLogRelMsgRCReturnStmt(rc, ("rc=%Rrc, %s\n", rc, szServiceName), pSvc->ReleaseService(), rc); 1445 1495 1446 1496 /* Call the service, so the operation is executed by the service thread. */ 1447 rc = pSvc->loadClientState(u32ClientId, pSSM); 1448 if (RT_FAILURE(rc)) 1449 { 1450 pSvc->ReleaseService(); 1451 AssertLogRelMsgFailed(("rc=%Rrc %s\n", rc, szServiceName)); 1452 return rc; 1453 } 1497 rc = pSvc->loadClientState(u32ClientId, pSSM, uVersion); 1498 AssertLogRelMsgRCReturnStmt(rc, ("rc=%Rrc, %s\n", rc, szServiceName), pSvc->ReleaseService(), rc); 1454 1499 } 1455 1500 … … 1475 1520 1476 1521 /* Allocate a client information structure. */ 1477 HGCMClient *pClient = new HGCMClient();1522 HGCMClient *pClient = new (std::nothrow) HGCMClient(fRequestor); 1478 1523 1479 1524 if (!pClient) … … 1851 1896 /** The user mode VM handle (for statistics and such). */ 1852 1897 PUVM pUVM; 1898 /** The HGCM port on the VMMDev device (for session ID and such). */ 1899 PPDMIHGCMPORT pHgcmPort; 1853 1900 }; 1854 1901 … … 1869 1916 { 1870 1917 public: 1871 /* SSM context. */1918 /** Saved state handle. */ 1872 1919 PSSMHANDLE pSSM; 1920 /** The HGCM saved state version being loaded (ignore for save). */ 1921 uint32_t uVersion; 1873 1922 }; 1874 1923 … … 2031 2080 pMsg->pszServiceName, pMsg->pszServiceLibrary, pMsg->pUVM)); 2032 2081 2033 rc = HGCMService::LoadService(pMsg->pszServiceLibrary, pMsg->pszServiceName, pMsg->pUVM );2082 rc = HGCMService::LoadService(pMsg->pszServiceLibrary, pMsg->pszServiceName, pMsg->pUVM, pMsg->pHgcmPort); 2034 2083 } break; 2035 2084 … … 2106 2155 LogFlowFunc(("HGCM_MSG_LOADSTATE\n")); 2107 2156 2108 rc = HGCMService::LoadState(pMsg->pSSM );2157 rc = HGCMService::LoadState(pMsg->pSSM, pMsg->uVersion); 2109 2158 } break; 2110 2159 … … 2223 2272 * @param pszServiceName The name to be assigned to the service. 2224 2273 * @param pUVM The user mode VM handle (for statistics and such). 2274 * @param pHgcmPort The HGCM port on the VMMDev device (for session ID and such). 2225 2275 * @return VBox rc. 2226 2276 */ 2227 2277 int HGCMHostLoad(const char *pszServiceLibrary, 2228 2278 const char *pszServiceName, 2229 PUVM pUVM) 2279 PUVM pUVM, 2280 PPDMIHGCMPORT pHgcmPort) 2230 2281 { 2231 2282 LogFlowFunc(("lib = %s, name = %s\n", pszServiceLibrary, pszServiceName)); … … 2248 2299 pMsg->pszServiceName = pszServiceName; 2249 2300 pMsg->pUVM = pUVM; 2301 pMsg->pHgcmPort = pHgcmPort; 2250 2302 2251 2303 rc = hgcmMsgSend(pMsg); … … 2403 2455 } 2404 2456 2405 /* Helper to send either HGCM_MSG_SAVESTATE or HGCM_MSG_LOADSTATE messages to the main HGCM thread.2457 /** Helper to send either HGCM_MSG_SAVESTATE or HGCM_MSG_LOADSTATE messages to the main HGCM thread. 2406 2458 * 2407 2459 * @param pSSM The SSM handle. 2408 * @param u32MsgId The message to be sent: HGCM_MSG_SAVESTATE or HGCM_MSG_LOADSTATE. 2460 * @param idMsg The message to be sent: HGCM_MSG_SAVESTATE or HGCM_MSG_LOADSTATE. 2461 * @param uVersion The state version being loaded. 2409 2462 * @return VBox rc. 2410 2463 */ 2411 static int hgcmHostLoadSaveState(PSSMHANDLE pSSM, 2412 uint32_t u32MsgId) 2413 { 2414 LogFlowFunc(("pSSM = %p, u32MsgId = %d\n", pSSM, u32MsgId)); 2464 static int hgcmHostLoadSaveState(PSSMHANDLE pSSM, uint32_t idMsg, uint32_t uVersion) 2465 { 2466 LogFlowFunc(("pSSM = %p, idMsg = %d, uVersion = uVersion\n", pSSM, idMsg)); 2415 2467 2416 2468 HGCMMsgCore *pCoreMsg; 2417 int rc = hgcmMsgAlloc(g_pHgcmThread, &pCoreMsg, u32MsgId, hgcmMainMessageAlloc);2469 int rc = hgcmMsgAlloc(g_pHgcmThread, &pCoreMsg, idMsg, hgcmMainMessageAlloc); 2418 2470 2419 2471 if (RT_SUCCESS(rc)) … … 2423 2475 2424 2476 pMsg->pSSM = pSSM; 2477 pMsg->uVersion = uVersion; 2425 2478 2426 2479 rc = hgcmMsgSend(pMsg); … … 2431 2484 } 2432 2485 2433 /* Save the state of services.2486 /** Save the state of services. 2434 2487 * 2435 2488 * @param pSSM The SSM handle. … … 2438 2491 int HGCMHostSaveState(PSSMHANDLE pSSM) 2439 2492 { 2440 return hgcmHostLoadSaveState(pSSM, HGCM_MSG_SAVESTATE );2441 } 2442 2443 /* Load the state of services.2493 return hgcmHostLoadSaveState(pSSM, HGCM_MSG_SAVESTATE, HGCM_SAVED_STATE_VERSION); 2494 } 2495 2496 /** Load the state of services. 2444 2497 * 2445 2498 * @param pSSM The SSM handle. 2499 * @param uVersion The state version being loaded. 2446 2500 * @return VBox rc. 2447 2501 */ 2448 int HGCMHostLoadState(PSSMHANDLE pSSM )2449 { 2450 return hgcmHostLoadSaveState(pSSM, HGCM_MSG_LOADSTATE );2502 int HGCMHostLoadState(PSSMHANDLE pSSM, uint32_t uVersion) 2503 { 2504 return hgcmHostLoadSaveState(pSSM, HGCM_MSG_LOADSTATE, uVersion); 2451 2505 } 2452 2506 -
trunk/src/VBox/Main/src-client/VMMDevInterface.cpp
r75574 r75853 680 680 LogFlowFunc(("Enter\n")); 681 681 682 if (uVersion != HGCM_SSM_VERSION) 682 if ( uVersion != HGCM_SAVED_STATE_VERSION 683 && uVersion != HGCM_SAVED_STATE_VERSION_V2) 683 684 return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION; 684 685 Assert(uPass == SSM_PASS_FINAL); NOREF(uPass); 685 686 686 return HGCMHostLoadState(pSSM );687 return HGCMHostLoadState(pSSM, uVersion); 687 688 } 688 689 … … 692 693 return VERR_INVALID_STATE; 693 694 695 /** @todo Construct all the services in the VMMDev::drvConstruct()!! */ 696 Assert( (mpDrv && mpDrv->pHGCMPort) 697 || !strcmp(pszServiceLibrary, "VBoxHostChannel") 698 || !strcmp(pszServiceLibrary, "VBoxSharedClipboard") 699 || !strcmp(pszServiceLibrary, "VBoxDragAndDropSvc") 700 || !strcmp(pszServiceLibrary, "VBoxGuestPropSvc") 701 || !strcmp(pszServiceLibrary, "VBoxSharedCrOpenGL") 702 ); 694 703 Console::SafeVMPtrQuiet ptrVM(mParent); 695 return HGCMHostLoad(pszServiceLibrary, pszServiceName, ptrVM.rawUVM() );704 return HGCMHostLoad(pszServiceLibrary, pszServiceName, ptrVM.rawUVM(), mpDrv ? mpDrv->pHGCMPort : NULL); 696 705 } 697 706 … … 864 873 865 874 #ifdef VBOX_WITH_HGCM 866 rc = pThis->pVMMDev->hgcmLoadService(VBOXSHAREDFOLDERS_DLL, 867 "VBoxSharedFolders"); 875 /* 876 * Load & configure the shared folders service. 877 */ 878 rc = pThis->pVMMDev->hgcmLoadService(VBOXSHAREDFOLDERS_DLL, "VBoxSharedFolders"); 868 879 pThis->pVMMDev->fSharedFolderActive = RT_SUCCESS(rc); 869 880 if (RT_SUCCESS(rc)) … … 892 903 LogRel(("Failed to load Shared Folders service %Rrc\n", rc)); 893 904 894 rc = PDMDrvHlpSSMRegisterEx(pDrvIns, HGCM_SSM_VERSION, 4096 /* bad guess */, 905 906 /* 907 * Load and configure guest control service. 908 */ 909 # ifdef VBOX_WITH_GUEST_CONTROL 910 rc = pThis->pVMMDev->hgcmLoadService("VBoxGuestControlSvc", "VBoxGuestControlSvc"); 911 if (RT_SUCCESS(rc)) 912 { 913 HGCMSVCEXTHANDLE hDummy; 914 rc = HGCMHostRegisterServiceExtension(&hDummy, "VBoxGuestControlSvc", 915 &Guest::i_notifyCtrlDispatcher, 916 pThis->pVMMDev->mParent->i_getGuest()); 917 if (RT_SUCCESS(rc)) 918 LogRel(("Guest Control service loaded\n")); 919 else 920 LogRel(("Warning: Cannot register VBoxGuestControlSvc extension! rc=%Rrc\n", rc)); 921 } 922 else 923 LogRel(("Warning!: Failed to load the Guest Control Service! %Rrc\n", rc)); 924 # endif /* VBOX_WITH_GUEST_CONTROL */ 925 926 927 /* 928 * The HGCM saved state. 929 */ 930 rc = PDMDrvHlpSSMRegisterEx(pDrvIns, HGCM_SAVED_STATE_VERSION, 4096 /* bad guess */, 895 931 NULL, NULL, NULL, 896 932 NULL, iface_hgcmSave, NULL,
Note:
See TracChangeset
for help on using the changeset viewer.