]> git.saurik.com Git - wxWidgets.git/commitdiff
fix compilation for latest SDK where EnumModulesProc() first parameter is now const...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Jan 2007 23:35:49 +0000 (23:35 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Jan 2007 23:35:49 +0000 (23:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dlmsw.cpp

index 2e6d519eddf32be06c15cea071fe1889b350a6ab..923a2b5144bbb94745b3754854853f0fb8bed659 100644 (file)
@@ -79,6 +79,16 @@ public:
         wxVersionDLL *verDLL;
     };
 
+    // the declared type of the first EnumModulesProc() parameter changed in
+    // recent SDK versions and is no PCSTR instead of old PSTR, we know that
+    // it's const in version 11 and non-const in version 8 included with VC8
+    // (and earlier), suppose that it's only changed in version 11
+    #if defined(API_VERSION_NUMBER) && API_VERSION_NUMBER >= 11
+        typedef PCSTR NameStr_t;
+    #else
+        typedef PSTR NameStr_t;
+    #endif
+
     // TODO: fix EnumerateLoadedModules() to use EnumerateLoadedModules64()
     #ifdef __WIN64__
         typedef DWORD64 DWORD_32_64;
@@ -87,7 +97,7 @@ public:
     #endif
 
     static BOOL CALLBACK
-    EnumModulesProc(PSTR name, DWORD_32_64 base, ULONG size, void *data);
+    EnumModulesProc(NameStr_t name, DWORD_32_64 base, ULONG size, void *data);
 };
 
 // ----------------------------------------------------------------------------
@@ -215,7 +225,7 @@ wxString wxVersionDLL::GetFileVersion(const wxString& filename) const
 
 /* static */
 BOOL CALLBACK
-wxDynamicLibraryDetailsCreator::EnumModulesProc(PSTR name,
+wxDynamicLibraryDetailsCreator::EnumModulesProc(NameStr_t name,
                                                 DWORD_32_64 base,
                                                 ULONG size,
                                                 void *data)