Changeset 51181 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg
- Timestamp:
- May 5, 2014 12:02:02 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 93552
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
r51153 r51181 277 277 } 278 278 279 /** @todo r=bird: This function is not in the header file, why is it 280 * exported? */ 281 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinInstallInfAndComponent(IN INetCfg *pNetCfg, IN LPCWSTR pszwComponentId, IN const GUID *pguidClass, 282 IN LPCWSTR const *apInfPaths, IN UINT cInfPaths, 283 OUT INetCfgComponent **ppComponent) 279 static HRESULT vboxNetCfgWinInstallInfAndComponent(IN INetCfg *pNetCfg, IN LPCWSTR pszwComponentId, IN const GUID *pguidClass, 280 IN LPCWSTR const *apInfPaths, IN UINT cInfPaths, 281 OUT INetCfgComponent **ppComponent) 284 282 { 285 283 HRESULT hr = S_OK; 286 UINT i= 0;284 UINT cFilesProcessed = 0; 287 285 288 286 NonStandardLogFlow(("Installing %u INF files ...\n", cInfPaths)); 289 287 290 for (; i < cInfPaths; i++)291 { 292 NonStandardLogFlow(("Installing INF file \"%ws\" ...\n", apInfPaths[ i]));293 hr = VBoxDrvCfgInfInstall(apInfPaths[ i]);288 for (; cFilesProcessed < cInfPaths; cFilesProcessed++) 289 { 290 NonStandardLogFlow(("Installing INF file \"%ws\" ...\n", apInfPaths[cFilesProcessed])); 291 hr = VBoxDrvCfgInfInstall(apInfPaths[cFilesProcessed]); 294 292 if (FAILED(hr)) 295 293 { … … 308 306 if (FAILED(hr)) 309 307 { 310 for (UINT j = i - 1; j != 0; j--) 311 VBoxDrvCfgInfUninstall(apInfPaths[j], 0); 308 NonStandardLogFlow(("Installation failed, rolling back installation set ...\n")); 309 310 do 311 { 312 HRESULT hr2 = VBoxDrvCfgInfUninstall(apInfPaths[cFilesProcessed], 0); 313 if (FAILED(hr2)) 314 NonStandardLogFlow(("VBoxDrvCfgInfUninstall failed, hr (0x%x)\n", hr2)); 315 /* Keep going. */ 316 if (!cFilesProcessed) 317 break; 318 } while (cFilesProcessed--); 319 320 NonStandardLogFlow(("Rollback complete\n")); 312 321 } 313 322 … … 2029 2038 { 2030 2039 NonStandardLog("NetFlt will be installed ...\n"); 2031 hr = VBoxNetCfgWinInstallInfAndComponent(pNc, VBOXNETCFGWIN_NETFLT_ID,2040 hr = vboxNetCfgWinInstallInfAndComponent(pNc, VBOXNETCFGWIN_NETFLT_ID, 2032 2041 &GUID_DEVCLASS_NETSERVICE, 2033 2042 apInfFullPaths,
Note:
See TracChangeset
for help on using the changeset viewer.