Changeset 63147 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Aug 8, 2016 11:12:33 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109765
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp
r62485 r63147 132 132 static int loadHostWebcamLibrary(const char *pszPath, RTLDRMOD *phmod, PFNVBOXHOSTWEBCAMLIST *ppfn) 133 133 { 134 int rc = VINF_SUCCESS; 135 RTLDRMOD hmod = NIL_RTLDRMOD; 136 137 RTERRINFOSTATIC ErrInfo; 138 RTErrInfoInitStatic(&ErrInfo); 134 int rc; 139 135 if (RTPathHavePath(pszPath)) 140 rc = SUPR3HardenedLdrLoadPlugIn(pszPath, &hmod, &ErrInfo.Core); 136 { 137 RTLDRMOD hmod = NIL_RTLDRMOD; 138 RTERRINFOSTATIC ErrInfo; 139 rc = SUPR3HardenedLdrLoadPlugIn(pszPath, &hmod, RTErrInfoInitStatic(&ErrInfo)); 140 if (RT_SUCCESS(rc)) 141 { 142 static const char s_szSymbol[] = "VBoxHostWebcamList"; 143 rc = RTLdrGetSymbol(hmod, s_szSymbol, (void **)ppfn); 144 if (RT_SUCCESS(rc)) 145 *phmod = hmod; 146 else 147 { 148 if (rc != VERR_SYMBOL_NOT_FOUND) 149 LogRel(("Resolving symbol '%s': %Rrc\n", s_szSymbol, rc)); 150 RTLdrClose(hmod); 151 hmod = NIL_RTLDRMOD; 152 } 153 } 154 else 155 { 156 LogRel(("Loading the library '%s': %Rrc\n", pszPath, rc)); 157 if (RTErrInfoIsSet(&ErrInfo.Core)) 158 LogRel((" %s\n", ErrInfo.Core.pszMsg)); 159 } 160 } 141 161 else 162 { 163 LogRel(("Loading the library '%s': No path! Refusing to try loading it!\n", pszPath)); 142 164 rc = VERR_INVALID_PARAMETER; 143 if (RT_SUCCESS(rc)) 144 { 145 static const char *pszSymbol = "VBoxHostWebcamList"; 146 rc = RTLdrGetSymbol(hmod, pszSymbol, (void **)ppfn); 147 148 if (RT_FAILURE(rc) && rc != VERR_SYMBOL_NOT_FOUND) 149 LogRel(("Resolving symbol '%s': %Rrc\n", pszSymbol, rc)); 150 } 151 else 152 { 153 LogRel(("Loading the library '%s': %Rrc\n", pszPath, rc)); 154 if (RTErrInfoIsSet(&ErrInfo.Core)) 155 LogRel((" %s\n", ErrInfo.Core.pszMsg)); 156 157 hmod = NIL_RTLDRMOD; 158 } 159 160 if (RT_SUCCESS(rc)) 161 { 162 *phmod = hmod; 163 } 164 else 165 { 166 if (hmod != NIL_RTLDRMOD) 167 { 168 RTLdrClose(hmod); 169 hmod = NIL_RTLDRMOD; 170 } 171 } 172 165 } 173 166 return rc; 174 167 } 175 168 176 static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");177 169 178 170 static HRESULT fillDeviceList(VirtualBox *pVirtualBox, HostVideoInputDeviceList *pList) … … 183 175 #ifdef VBOX_WITH_EXTPACK 184 176 ExtPackManager *pExtPackMgr = pVirtualBox->i_getExtPackManager(); 185 hr = pExtPackMgr->i_getLibraryPathForExtPack("VBoxHostWebcam", &strExtPackPuel, &strLibrary);177 hr = pExtPackMgr->i_getLibraryPathForExtPack("VBoxHostWebcam", ORACLE_PUEL_EXTPACK_NAME, &strLibrary); 186 178 #else 187 179 hr = E_NOTIMPL; -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r63145 r63147 47 47 48 48 typedef std::list<Guid> GuidList; 49 50 51 #ifdef VBOX_WITH_EXTPACK 52 static const char g_szVDPlugin[] = "VDPluginCrypt"; 53 #endif 54 49 55 50 56 //////////////////////////////////////////////////////////////////////////////// … … 3574 3580 3575 3581 # ifdef VBOX_WITH_EXTPACK 3576 static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");3577 static const char *s_pszVDPlugin = "VDPluginCrypt";3578 3582 ExtPackManager *pExtPackManager = m->pVirtualBox->i_getExtPackManager(); 3579 if (pExtPackManager->i_isExtPackUsable( strExtPackPuel.c_str()))3583 if (pExtPackManager->i_isExtPackUsable(ORACLE_PUEL_EXTPACK_NAME)) 3580 3584 { 3581 3585 /* Load the plugin */ 3582 3586 Utf8Str strPlugin; 3583 rc = pExtPackManager->i_getLibraryPathForExtPack( s_pszVDPlugin, &strExtPackPuel, &strPlugin);3587 rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin); 3584 3588 if (SUCCEEDED(rc)) 3585 3589 { … … 3593 3597 throw setError(VBOX_E_NOT_SUPPORTED, 3594 3598 tr("Encryption is not supported because the extension pack '%s' is missing the encryption plugin (old extension pack installed?)"), 3595 strExtPackPuel.c_str());3599 ORACLE_PUEL_EXTPACK_NAME); 3596 3600 } 3597 3601 else 3598 3602 throw setError(VBOX_E_NOT_SUPPORTED, 3599 3603 tr("Encryption is not supported because the extension pack '%s' is missing"), 3600 strExtPackPuel.c_str());3604 ORACLE_PUEL_EXTPACK_NAME); 3601 3605 3602 3606 PVBOXHDD pDisk = NULL; … … 3652 3656 3653 3657 # ifdef VBOX_WITH_EXTPACK 3654 static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");3655 static const char *s_pszVDPlugin = "VDPluginCrypt";3656 3658 ExtPackManager *pExtPackManager = m->pVirtualBox->i_getExtPackManager(); 3657 if (pExtPackManager->i_isExtPackUsable( strExtPackPuel.c_str()))3659 if (pExtPackManager->i_isExtPackUsable(ORACLE_PUEL_EXTPACK_NAME)) 3658 3660 { 3659 3661 /* Load the plugin */ 3660 3662 Utf8Str strPlugin; 3661 rc = pExtPackManager->i_getLibraryPathForExtPack( s_pszVDPlugin, &strExtPackPuel, &strPlugin);3663 rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin); 3662 3664 if (SUCCEEDED(rc)) 3663 3665 { … … 3671 3673 throw setError(VBOX_E_NOT_SUPPORTED, 3672 3674 tr("Encryption is not supported because the extension pack '%s' is missing the encryption plugin (old extension pack installed?)"), 3673 strExtPackPuel.c_str());3675 ORACLE_PUEL_EXTPACK_NAME); 3674 3676 } 3675 3677 else 3676 3678 throw setError(VBOX_E_NOT_SUPPORTED, 3677 3679 tr("Encryption is not supported because the extension pack '%s' is missing"), 3678 strExtPackPuel.c_str());3680 ORACLE_PUEL_EXTPACK_NAME); 3679 3681 3680 3682 PVBOXHDD pDisk = NULL; … … 9414 9416 9415 9417 #ifdef VBOX_WITH_EXTPACK 9416 static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");9417 static const char *s_pszVDPlugin = "VDPluginCrypt";9418 9418 ExtPackManager *pExtPackManager = m->pVirtualBox->i_getExtPackManager(); 9419 if (pExtPackManager->i_isExtPackUsable( strExtPackPuel.c_str()))9419 if (pExtPackManager->i_isExtPackUsable(ORACLE_PUEL_EXTPACK_NAME)) 9420 9420 { 9421 9421 /* Load the plugin */ 9422 9422 Utf8Str strPlugin; 9423 rc = pExtPackManager->i_getLibraryPathForExtPack( s_pszVDPlugin, &strExtPackPuel, &strPlugin);9423 rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin); 9424 9424 if (SUCCEEDED(rc)) 9425 9425 { … … 9433 9433 throw setError(VBOX_E_NOT_SUPPORTED, 9434 9434 tr("Encryption is not supported because the extension pack '%s' is missing the encryption plugin (old extension pack installed?)"), 9435 strExtPackPuel.c_str());9435 ORACLE_PUEL_EXTPACK_NAME); 9436 9436 } 9437 9437 else 9438 9438 throw setError(VBOX_E_NOT_SUPPORTED, 9439 9439 tr("Encryption is not supported because the extension pack '%s' is missing"), 9440 strExtPackPuel.c_str());9440 ORACLE_PUEL_EXTPACK_NAME); 9441 9441 #else 9442 9442 throw setError(VBOX_E_NOT_SUPPORTED, … … 9896 9896 { 9897 9897 # ifdef VBOX_WITH_EXTPACK 9898 static const Utf8Str strExtPackPuel("Oracle VM VirtualBox Extension Pack");9899 static const char *s_pszVDPlugin = "VDPluginCrypt";9900 9898 ExtPackManager *pExtPackManager = m->pVirtualBox->i_getExtPackManager(); 9901 if (pExtPackManager->i_isExtPackUsable( strExtPackPuel.c_str()))9899 if (pExtPackManager->i_isExtPackUsable(ORACLE_PUEL_EXTPACK_NAME)) 9902 9900 { 9903 9901 /* Load the plugin */ 9904 9902 Utf8Str strPlugin; 9905 rc = pExtPackManager->i_getLibraryPathForExtPack( s_pszVDPlugin, &strExtPackPuel, &strPlugin);9903 rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin); 9906 9904 if (SUCCEEDED(rc)) 9907 9905 { … … 9915 9913 throw setError(VBOX_E_NOT_SUPPORTED, 9916 9914 tr("Encryption is not supported because the extension pack '%s' is missing the encryption plugin (old extension pack installed?)"), 9917 strExtPackPuel.c_str());9915 ORACLE_PUEL_EXTPACK_NAME); 9918 9916 } 9919 9917 else 9920 9918 throw setError(VBOX_E_NOT_SUPPORTED, 9921 9919 tr("Encryption is not supported because the extension pack '%s' is missing"), 9922 strExtPackPuel.c_str());9920 ORACLE_PUEL_EXTPACK_NAME); 9923 9921 9924 9922 PVBOXHDD pDisk = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.