Changeset 60638 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg
- Timestamp:
- Apr 21, 2016 11:48:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
r60620 r60638 61 61 #define VBOX_NETCFG_LOCK_TIME_OUT 5000 /** @todo r=bird: What does this do? */ 62 62 63 #define VBOXNETCFGWIN_NETADP_ID L"sun_VBoxNetAdp" 63 64 64 65 /* … … 324 325 */ 325 326 res = pTempComponent->OpenParamKey(&hkey); 326 if(SUCCEEDED(res) && hkey != NULL) 327 328 /* Set default metric value for host-only interface only */ 329 if (SUCCEEDED(res) && hkey != NULL && wcsnicmp(pszwComponentId, VBOXNETCFGWIN_NETADP_ID, 256) == 0) 330 { 327 331 res = vboxNetCfgWinSetupMetric(hkey); 328 if (FAILED(res)) 329 { 330 /* 331 * The setting of Metric is not very important functionality, 332 * So we will not break installation process due to this error. 333 */ 334 NonStandardLogFlow(("VBoxNetCfgWinInstallComponent Warning! " 335 "vboxNetCfgWinSetupMetric failed, default metric " 336 "for new interface will not be set, hr (0x%x)\n", res)); 332 if (FAILED(res)) 333 { 334 /* 335 * The setting of Metric is not very important functionality, 336 * So we will not break installation process due to this error. 337 */ 338 NonStandardLogFlow(("VBoxNetCfgWinInstallComponent Warning! " 339 "vboxNetCfgWinSetupMetric failed, default metric " 340 "for new interface will not be set, hr (0x%x)\n", res)); 341 } 337 342 } 338 343 if (ppComponent != NULL) … … 2165 2170 } 2166 2171 2167 #define VBOXNETCFGWIN_NETADP_ID L"sun_VBoxNetAdp"2168 2172 static HRESULT vboxNetCfgWinNetAdpUninstall(IN INetCfg *pNc, LPCWSTR pwszId, DWORD InfRmFlags) 2169 2173 { … … 3425 3429 3426 3430 rc = g_pfnGetIpInterfaceEntry(&row); 3427 if (rc != 0)3428 return E_FAIL;3431 if (rc != NO_ERROR) 3432 return HRESULT_FROM_WIN32(rc); 3429 3433 3430 3434 *Metric = row.Metric; … … 3452 3456 3453 3457 // change settings 3454 return g_pfnSetIpInterfaceEntry(&newRow);3458 return HRESULT_FROM_WIN32(g_pfnSetIpInterfaceEntry(&newRow)); 3455 3459 } 3456 3460 … … 3469 3473 res = RegQueryValueExW(hKey, L"NetLuidIndex", NULL, 3470 3474 &dwValueType, (LPBYTE)&luidIndex, &cbSize); 3471 if ( FAILED(res))3472 return res;3475 if (res != 0) 3476 return HRESULT_FROM_WIN32(res); 3473 3477 3474 3478 cbSize = sizeof(ifType); … … 3476 3480 res = RegQueryValueExW(hKey, L"*IfType", NULL, 3477 3481 &dwValueType, (LPBYTE)&ifType, &cbSize); 3478 if ( FAILED(res))3479 return res;3482 if (res != 0) 3483 return HRESULT_FROM_WIN32(res); 3480 3484 3481 3485 ZeroMemory(pLUID, sizeof(NET_LUID));
Note:
See TracChangeset
for help on using the changeset viewer.