]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dynlib.cpp
fixed 64but bug with g_strEmpty initialization
[wxWidgets.git] / src / common / dynlib.cpp
index 6384eb3a8babddbc8a3c09d0f60a48a717d0048c..2fd32ddd586b3d5cade90e041a3e677898061baa 100644 (file)
 #pragma implementation "dynlib.h"
 #endif
 
+#include  "wx/wxprec.h"
+
+#ifdef    __BORLANDC__
+  #pragma hdrstop
+#endif  //__BORLANDC__
+
+#ifndef WX_PRECOMP
+#endif //WX_PRECOMP
+
 #include <wx/dynlib.h>
 #include <wx/filefn.h>
 #include <wx/list.h>
 #include <windows.h>
 #endif
 
+#ifdef LoadLibrary
+#undef LoadLibrary
+#endif
+
 // ---------------------------------------------------------------------------
 // Global variables
 // ---------------------------------------------------------------------------
@@ -83,9 +96,9 @@ void wxLibrary::PrepareClasses(wxClassInfo **first)
   wxClassInfo *info = *first;
   while (info)
   {
-    if (info->className)
-      classTable.Put(info->className, (wxObject *)info);
-    info = info->next;
+    if (info->m_className)
+      classTable.Put(info->m_className, (wxObject *)info);
+    info = info->m_next;
   }
 
   // Set base pointers for each wxClassInfo
@@ -93,10 +106,10 @@ void wxLibrary::PrepareClasses(wxClassInfo **first)
   while (info)
   {
     if (info->GetBaseClassName1())
-      info->baseInfo1 = (wxClassInfo *)classTable.Get(info->GetBaseClassName1());
+      info->m_baseInfo1 = (wxClassInfo *)classTable.Get(info->GetBaseClassName1());
     if (info->GetBaseClassName2())
-      info->baseInfo2 = (wxClassInfo *)classTable.Get(info->GetBaseClassName2());
-    info = info->next;
+      info->m_baseInfo2 = (wxClassInfo *)classTable.Get(info->GetBaseClassName2());
+    info = info->m_next;
   }
   *first = NULL;
 }
@@ -107,7 +120,7 @@ void *wxLibrary::GetSymbol(const wxString& symbname)
   return dlsym(m_handle, WXSTRINGCAST symbname);
 #endif
 #ifdef __WINDOWS__
-  return GetProcAddress(m_handle, WXSTRINGCAST symbname);
+  return GetProcAddress((HINSTANCE) m_handle, WXSTRINGCAST symbname);
 #endif
   return NULL;
 }
@@ -154,7 +167,11 @@ wxLibrary *wxLibraries::LoadLibrary(const wxString& name)
 #elif defined(__WINDOWS__)
   lib_name += ".dll";
 
-  HMODULE handle = LoadLibrary(lib_name);
+#ifdef UNICODE
+  HMODULE handle = LoadLibraryW(lib_name);
+#else
+  HMODULE handle = LoadLibraryA(lib_name);
+#endif
   if (!handle)
     return NULL;
 #else