aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/file_util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wsutil/file_util.c b/wsutil/file_util.c
index d44c30ba67..1403b0dcea 100644
--- a/wsutil/file_util.c
+++ b/wsutil/file_util.c
@@ -487,10 +487,11 @@ ws_init_dll_search_path()
gboolean dll_dir_set = FALSE;
wchar_t *program_path_w;
- typedef BOOL (*SetDllDirectoryHandler)(LPCTSTR);
+ typedef BOOL (WINAPI *SetDllDirectoryHandler)(LPCTSTR);
SetDllDirectoryHandler PSetDllDirectory;
- if (PSetDllDirectory = (SetDllDirectoryHandler) GetProcAddress(GetModuleHandle(_T("kernel32.dll")), "SetDllDirectoryW")) {
+ PSetDllDirectory = (SetDllDirectoryHandler) GetProcAddress(GetModuleHandle(_T("kernel32.dll")), "SetDllDirectoryW");
+ if (PSetDllDirectory) {
dll_dir_set = PSetDllDirectory(_T(""));
}