made wxDllLoader more backwards compatible

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-07-22 14:42:38 +00:00
parent f44b23b6f7
commit 3d7fa4e684
2 changed files with 5 additions and 2 deletions

View File

@ -301,7 +301,7 @@ class WXDLLEXPORT wxDllLoader
{
public:
static wxDllType LoadLibrary(const wxString& name);
static wxDllType LoadLibrary(const wxString& name, bool *success = NULL);
static void UnloadLibrary(wxDllType dll);
static wxDllType GetProgramHandle() { return wxDynamicLibrary::GetProgramHandle(); }

View File

@ -657,7 +657,7 @@ void wxPluginManager::Unload()
#if WXWIN_COMPATIBILITY_2_2
wxDllType wxDllLoader::LoadLibrary(const wxString &name)
wxDllType wxDllLoader::LoadLibrary(const wxString &name, bool *success)
{
wxPluginLibrary *p = wxPluginManager::LoadLibrary
(
@ -665,6 +665,9 @@ wxDllType wxDllLoader::LoadLibrary(const wxString &name)
wxDL_DEFAULT | wxDL_VERBATIM | wxDL_NOSHARE
);
if ( success )
*success = p != NULL;
return p ? p->GetLibHandle() : 0;
}