VirtualBox

Changeset 62779 in vbox


Ignore:
Timestamp:
Jul 31, 2016 10:20:35 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109366
Message:

Installer: warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp

    r62778 r62779  
    979979    logStringW(hModule, L"CreateHostOnlyInterface: Creating host-only interface");
    980980
    981     HRESULT hr;
    982 
     981    HRESULT hr = E_FAIL;
    983982    GUID guid;
    984983    WCHAR wszMpInf[MAX_PATH];
    985984    DWORD cchMpInf = RT_ELEMENTS(wszMpInf) - (DWORD)wcslen(pwszInfName) - 1 - 1;
    986985    LPCWSTR pwszInfPath = NULL;
    987     bool bIsFile = false;
     986    bool fIsFile = false;
    988987    UINT uErr = MsiGetPropertyW(hModule, L"CustomActionData", wszMpInf, &cchMpInf);
    989988    if (uErr == ERROR_SUCCESS)
     
    1000999            wcscat(wszMpInf, pwszInfName);
    10011000            pwszInfPath = wszMpInf;
    1002             bIsFile = true;
     1001            fIsFile = true;
    10031002
    10041003            logStringW(hModule, L"CreateHostOnlyInterface: Resulting INF path = %s", pwszInfPath);
     
    10111010
    10121011    /* Make sure the inf file is installed. */
    1013     if (pwszInfPath != NULL && bIsFile)
     1012    if (pwszInfPath != NULL && fIsFile)
    10141013    {
    10151014        logStringW(hModule, L"CreateHostOnlyInterface: Calling VBoxDrvCfgInfInstall(%s)", pwszInfPath);
     
    10431042#ifdef VBOXNETCFG_DELAYEDRENAME
    10441043            BSTR devId;
    1045             hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, bIsFile, &guid, &devId, NULL);
     1044            hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, fIsFile, &guid, &devId, NULL);
    10461045#else /* !VBOXNETCFG_DELAYEDRENAME */
    1047             hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, bIsFile, &guid, NULL, NULL);
     1046            hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, fIsFile, &guid, NULL, NULL);
    10481047#endif /* !VBOXNETCFG_DELAYEDRENAME */
    10491048            logStringW(hModule, L"CreateHostOnlyInterface: VBoxNetCfgWinCreateHostOnlyNetworkInterface returns 0x%x", hr);
     
    11811180    DWORD cchMpInf = RT_ELEMENTS(wszMpInf) - (DWORD)wcslen(pwszInfName) - 1 - 1;
    11821181    LPCWSTR pwszInfPath = NULL;
    1183     bool bIsFile = false;
     1182    bool fIsFile = false;
    11841183    UINT uErr = MsiGetPropertyW(hModule, L"CustomActionData", wszMpInf, &cchMpInf);
    11851184    if (uErr == ERROR_SUCCESS)
     
    11961195            wcscat(wszMpInf, pwszInfName);
    11971196            pwszInfPath = wszMpInf;
    1198             bIsFile = true;
     1197            fIsFile = true;
    11991198
    12001199            logStringW(hModule, L"UpdateHostOnlyInterfaces: Resulting INF path = %s", pwszInfPath);
     
    13691368}
    13701369
    1371 #define SetErrBreak(strAndArgs) \
     1370#define SetErrBreak(args) \
    13721371    if (1) { \
    13731372        rc = 0; \
    1374         logStringW(hModule, strAndArgs); \
     1373        logStringW args; \
    13751374        break; \
    13761375    } else do {} while (0)
     
    13961395            LONG lStatus = RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRegLocation, 0, KEY_READ, &hkeyNetwork);
    13971396            if ((lStatus != ERROR_SUCCESS) || !hkeyNetwork)
    1398                 SetErrBreak((L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [1]", wszRegLocation));
     1397                SetErrBreak((hModule, L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [1]",
     1398                             wszRegLocation));
    13991399
    14001400            lStatus = RegOpenKeyExW(hkeyNetwork, L"Connection", 0, KEY_READ, &hkeyConnection);
    14011401            if ((lStatus != ERROR_SUCCESS) || !hkeyConnection)
    1402                 SetErrBreak((L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [2]", wszRegLocation));
     1402                SetErrBreak((hModule, L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [2]",
     1403                             wszRegLocation));
    14031404
    14041405            DWORD len = sizeof(wszPnPInstanceId);
     
    14071408                                       &dwKeyType, (LPBYTE)&wszPnPInstanceId[0], &len);
    14081409            if ((lStatus != ERROR_SUCCESS) || (dwKeyType != REG_SZ))
    1409                 SetErrBreak((L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [3]", wszRegLocation));
     1410                SetErrBreak((hModule, L"VBox HostInterfaces: Host interface network was not found in registry (%s)! [3]",
     1411                             wszRegLocation));
    14101412        }
    14111413        while (0);
     
    14421444            {
    14431445                logStringW(hModule, L"VBox HostInterfaces: SetupDiGetClassDevs failed (0x%08X)!", GetLastError());
    1444                 SetErrBreak(L"VBox HostInterfaces: Uninstallation failed!");
     1446                SetErrBreak((hModule, L"VBox HostInterfaces: Uninstallation failed!"));
    14451447            }
    14461448
     
    15451547                {
    15461548                    logStringW(hModule, L"VBox HostInterfaces: SetupDiSetSelectedDevice failed (0x%08X)!", GetLastError());
    1547                     SetErrBreak(L"VBox HostInterfaces: Uninstallation failed!");
     1549                    SetErrBreak((hModule, L"VBox HostInterfaces: Uninstallation failed!"));
    15481550                }
    15491551
     
    15521554                {
    15531555                    logStringW(hModule, L"VBox HostInterfaces: SetupDiCallClassInstaller (DIF_REMOVE) failed (0x%08X)!", GetLastError());
    1554                     SetErrBreak(L"VBox HostInterfaces: Uninstallation failed!");
     1556                    SetErrBreak((hModule, L"VBox HostInterfaces: Uninstallation failed!"));
    15551557                }
    15561558            }
    15571559            else
    1558                 SetErrBreak(L"VBox HostInterfaces: Host interface network device not found!");
    1559         }
    1560         while (0);
     1560                SetErrBreak((hModule, L"VBox HostInterfaces: Host interface network device not found!"));
     1561        } while (0);
    15611562
    15621563        /* clean up the device info set */
    15631564        if (hDeviceInfo != INVALID_HANDLE_VALUE)
    15641565            SetupDiDestroyDeviceInfoList(hDeviceInfo);
    1565     }
    1566     while (0);
     1566    } while (0);
    15671567    return rc;
    15681568}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette