X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/defbed48e78f4e84b35f62c2c1b7fd58d740501c..7722d490f224d8f292f27fd90b1f42a00e20da8b:/include/wx/dynlib.h diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index ceef9b58c5..70287c0b19 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -33,6 +33,10 @@ #include "wx/msw/private.h" #endif +#if defined(HAVE_DLERROR) && !defined(__EMX__) + #define wxHAVE_DYNLIB_ERROR +#endif + class WXDLLIMPEXP_BASE wxDynamicLibraryDetailsCreator; // ---------------------------------------------------------------------------- @@ -196,8 +200,8 @@ public: // 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); - + 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 @@ -239,7 +243,11 @@ public: static void *RawGetSymbol(wxDllType handle, const wxString& name); void *RawGetSymbol(const wxString& name) const { +#if defined (__WXPM__) || defined(__EMX__) + return GetSymbol(name); +#else return RawGetSymbol(m_handle, name); +#endif } // return all modules/shared libraries in the address space of this process @@ -271,6 +279,11 @@ protected: // common part of GetSymbol() and HasSymbol() void *DoGetSymbol(const wxString& name, bool *success = 0) const; +#ifdef wxHAVE_DYNLIB_ERROR + // log the error after a dlxxx() function failure + static void Error(); +#endif // wxHAVE_DYNLIB_ERROR + // platform specific shared lib suffix. static const wxChar *ms_dllext;