VirtualBox

Ignore:
Timestamp:
Jun 17, 2013 2:32:51 PM (12 years ago)
Author:
vboxsync
Message:

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp

    r46386 r46593  
    21402140
    21412141
    2142 #define NETSHELL_LIBRARY _T("netshell.dll")
    2143 
    21442142/**
    21452143 *  Use the IShellFolder API to rename the connection.
     
    21872185
    21882186    return hr;
     2187}
     2188
     2189/**
     2190 * Loads a system DLL.
     2191 *
     2192 * @returns Module handle or NULL
     2193 * @param   pszName             The DLL name.
     2194 */
     2195static HMODULE loadSystemDll(const char *pszName)
     2196{
     2197    char   szPath[MAX_PATH];
     2198    UINT   cchPath = GetSystemDirectoryA(szPath, sizeof(szPath));
     2199    size_t cbName  = strlen(pszName) + 1;
     2200    if (cchPath + 1 + cbName > sizeof(szPath))
     2201        return NULL;
     2202    szPath[cchPath] = '\\';
     2203    memcpy(&szPath[cchPath + 1], pszName, cbName);
     2204    return LoadLibraryA(szPath);
    21892205}
    21902206
     
    22092225        if (FAILED(status))
    22102226            return E_FAIL;
    2211         hNetShell = LoadLibrary (NETSHELL_LIBRARY);
     2227        hNetShell = loadSystemDll("netshell.dll");
    22122228        if (hNetShell == NULL)
    22132229            return E_FAIL;
Note: See TracChangeset for help on using the changeset viewer.

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