according to MSDN, passing NULL as hModule to GetModuleFileName will get the path for the executable of the process so there's no need for g_hInstance

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4904 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-01-25 22:24:26 +00:00
parent d01e124228
commit 0243b40a1d
2 changed files with 2 additions and 2 deletions

View file

@ -130,7 +130,7 @@ const char * NSISCALL loadHeaders(int cl_flags)
HANDLE db_hFile;
GetModuleFileName(g_hInstance, state_exe_directory, NSIS_MAX_STRLEN);
GetModuleFileName(NULL, state_exe_directory, NSIS_MAX_STRLEN);
g_db_hFile = db_hFile = myOpenFile(state_exe_directory, GENERIC_READ, OPEN_EXISTING);
if (db_hFile == INVALID_HANDLE_VALUE)