X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/752c7d6bbdf97037c9a2bf20625b47951b76aa4a..d674cf6dc3493e154ac9600f811318b85730e020:/include/wx/dynlib.h diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index eb402a3dd9..0802665377 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -42,18 +42,20 @@ #elif defined(__WINDOWS__) # include typedef HMODULE wxDllType; +#elif defined(__OS2__) +# define INCL_DOS +# include + typedef HMODULE wxDllType; #elif defined(__WXMAC__) typedef CFragConnectionID wxDllType; #else # error "wxLibrary can't be compiled on this platform, sorry." #endif // OS -// defined in windows.h -// This breaks app.cpp if RICHEDIT is included. -#if 0 -#ifdef LoadLibrary -# undef LoadLibrary -#endif +// LoadLibrary is defined in windows.h as LoadLibraryA, but wxDllLoader method +// should be called LoadLibrary, not LoadLibraryA or LoadLibraryW! +#if defined(__WIN32__) && defined(LoadLibrary) +# include "wx/msw/winundef.h" #endif // ---------------------------------------------------------------------------- @@ -75,7 +77,7 @@ class wxDllLoader @param success Must point to a bool variable which will be set to TRUE or FALSE. @return A handle to the loaded DLL. Use success parameter to test if it is valid. */ - static wxDllType LoadLibrary(const wxString & libname, bool *success); + static wxDllType LoadLibrary(const wxString & libname, bool *success = NULL); /** This function unloads the shared library. */ static void UnloadLibrary(wxDllType dll); /** This function returns a valid handle for the main program