# error "wxLibrary can't be compiled on this platform, sorry."
#endif // OS
-// defined in windows.h
-#ifdef LoadLibrary
-# undef LoadLibrary
+// 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
// ----------------------------------------------------------------------------
@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 LoadDll(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
+ itself. */
+ static wxDllType GetProgramHandle(void);
/** This function resolves a symbol in a loaded DLL, such as a
variable or function name.
@param dllHandle Handle of the DLL, as returned by LoadDll().
static void * GetSymbol(wxDllType dllHandle, const wxString &name);
private:
/// forbid construction of objects
- wxDllLoader()
+ wxDllLoader();
};
// ----------------------------------------------------------------------------