+ // NOTE: this class is (deliberately) not virtual, do not attempt
+ // to use it polymorphically.
+ ~wxDynamicLibrary() { Unload(); }
+
+ // return true if the library was loaded successfully
+ bool IsLoaded() const { return m_handle != 0; }
+
+ // load the library with the given name (full or not), return true if ok
+ bool Load(const wxString& libname, int flags = wxDL_DEFAULT);
+
+ // raw function for loading dynamic libs: always behaves as if
+ // wxDL_VERBATIM were specified and doesn't log error message if the
+ // library couldn't be loaded but simply returns NULL
+ static wxDllType RawLoad(const wxString& libname, int flags = wxDL_DEFAULT);
+
+ // detach the library object from its handle, i.e. prevent the object from
+ // unloading the library in its dtor -- the caller is now responsible for
+ // doing this
+ wxDllType Detach() { wxDllType h = m_handle; m_handle = 0; return h; }
+
+ // unload the given library handle (presumably returned by Detach() before)
+ static void Unload(wxDllType handle);
+