]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dlmsw.cpp
removed #ifndef __WXUNIVERSAL__ added in last commit, shouldn't be necessary any...
[wxWidgets.git] / src / msw / dlmsw.cpp
index f0f1076135f4d200c0038ac9cc9198bb69130c86..67b52f000af3c203e9a4fdf83cd9c8d9d3d05dda 100644 (file)
@@ -97,7 +97,7 @@ HMODULE wxGetModuleHandle(const char *name, void *addr)
     // GetModuleHandleEx() is only available under XP and later, coincidence?)
 
     // check if we can use GetModuleHandleEx
-    typedef BOOL (WINAPI *GetModuleHandleEx_t)(DWORD, LPCTSTR, HMODULE *);
+    typedef BOOL (WINAPI *GetModuleHandleEx_t)(DWORD, LPCSTR, HMODULE *);
 
     static const GetModuleHandleEx_t INVALID_FUNC_PTR = (GetModuleHandleEx_t)-1;
 
@@ -247,7 +247,8 @@ wxDynamicLibraryDetailsCreator::EnumModulesProc(PSTR name,
 // ----------------------------------------------------------------------------
 
 /* static */
-wxDllType wxDynamicLibrary::RawLoad(const wxString& libname)
+wxDllType
+wxDynamicLibrary::RawLoad(const wxString& libname, int WXUNUSED(flags))
 {
     return ::LoadLibrary(libname);
 }
@@ -261,7 +262,7 @@ void wxDynamicLibrary::Unload(wxDllType handle)
 /* static */
 void *wxDynamicLibrary::RawGetSymbol(wxDllType handle, const wxString& name)
 {
-    return ::GetProcAddress(handle, name);
+    return ::GetProcAddress(handle, name.ToAscii());
 }
 
 // ----------------------------------------------------------------------------
@@ -273,6 +274,7 @@ wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded()
 {
     wxDynamicLibraryDetailsArray dlls;
 
+#if wxUSE_DBGHELP
     if ( wxDbgHelpDLL::Init() )
     {
         // prepare to use functions for version info extraction
@@ -292,6 +294,7 @@ wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded()
             wxLogLastError(_T("EnumerateLoadedModules"));
         }
     }
+#endif // wxUSE_DBGHELP
 
     return dlls;
 }