Changeset 46593 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Jun 17, 2013 2:32:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
r46386 r46593 2140 2140 2141 2141 2142 #define NETSHELL_LIBRARY _T("netshell.dll")2143 2144 2142 /** 2145 2143 * Use the IShellFolder API to rename the connection. … … 2187 2185 2188 2186 return hr; 2187 } 2188 2189 /** 2190 * Loads a system DLL. 2191 * 2192 * @returns Module handle or NULL 2193 * @param pszName The DLL name. 2194 */ 2195 static 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); 2189 2205 } 2190 2206 … … 2209 2225 if (FAILED(status)) 2210 2226 return E_FAIL; 2211 hNetShell = LoadLibrary (NETSHELL_LIBRARY);2227 hNetShell = loadSystemDll("netshell.dll"); 2212 2228 if (hNetShell == NULL) 2213 2229 return E_FAIL;
Note:
See TracChangeset
for help on using the changeset viewer.