X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4a8c29f7a3ffa7eb60d9b7f055565eb2df368d9..3c024cc22f19fa0d809dbfe3050257998def6e78:/src/common/dynlib.cpp diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 6384eb3a8b..2fd32ddd58 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -13,6 +13,15 @@ #pragma implementation "dynlib.h" #endif +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif //__BORLANDC__ + +#ifndef WX_PRECOMP +#endif //WX_PRECOMP + #include #include #include @@ -30,6 +39,10 @@ #include #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