ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] [Patch] wsutil/file_util.c

From: Gisle Vanem <gvanem@xxxxxxxxxxxx>
Date: Wed, 17 Aug 2011 21:40:15 +0200
Here is another patch for a missing WINAPI:

--- SVN-Latest\wsutil\file_util.c       Mon Jul 18 21:40:32 2011
+++ wsutil\file_util.c  Wed Aug 17 21:36:27 2011
@@ -487,10 +487,11 @@
      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(""));
      }

-------------

--gv