removed #ifndef __WXUNIVERSAL__ added in last commit, shouldn't be necessary any...
[wxWidgets.git] / src / msw / dlmsw.cpp
index 0e3151d5542096a083b2c394814125905fa6b619..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;
 
@@ -262,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());
 }
 
 // ----------------------------------------------------------------------------
@@ -274,6 +274,7 @@ wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded()
 {
     wxDynamicLibraryDetailsArray dlls;
 
+#if wxUSE_DBGHELP
     if ( wxDbgHelpDLL::Init() )
     {
         // prepare to use functions for version info extraction
@@ -293,6 +294,7 @@ wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded()
             wxLogLastError(_T("EnumerateLoadedModules"));
         }
     }
+#endif // wxUSE_DBGHELP
 
     return dlls;
 }