Changeset 46709 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jun 20, 2013 2:51:52 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86624
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp
r46593 r46709 138 138 * @param pszName The DLL name. 139 139 */ 140 static HMODULE load SystemDll(const char *pszName)140 static HMODULE loadInstalledDll(const char *pszName) 141 141 { 142 142 char szPath[MAX_PATH]; 143 UINT cchPath = GetSystemDirectoryA(szPath, sizeof(szPath)); 144 size_t cbName = strlen(pszName) + 1; 143 UINT cchPath = GetModuleFileNameA(NULL, szPath, sizeof(szPath)); 144 if (cchPath && cchPath <= sizeof(szPath)) 145 { 146 char *pszSlashFile = strrchr(szPath, '\\'); 147 if (pszSlashFile) 148 cchPath = pszSlashFile - szPath; 149 } 145 150 if (cchPath + 1 + cbName > sizeof(szPath)) 146 151 return NULL; … … 164 169 { 165 170 HRESULT hr = S_OK; 166 HMODULE hDIFxAPI = load SystemDll("DIFxAPI.dll");171 HMODULE hDIFxAPI = loadInstalledDll("DIFxAPI.dll"); 167 172 if (NULL == hDIFxAPI) 168 173 {
Note:
See TracChangeset
for help on using the changeset viewer.