From 752c7d6bbdf97037c9a2bf20625b47951b76aa4a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karsten=20Ball=C3=BCder?= Date: Sat, 3 Jul 1999 19:34:48 +0000 Subject: [PATCH] Added wxDllLoader::UnloadLibrary() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dynlib.h | 2 ++ src/common/dynlib.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index 860088f690..eb402a3dd9 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -76,6 +76,8 @@ class wxDllLoader @return A handle to the loaded DLL. Use success parameter to test if it is valid. */ static wxDllType LoadLibrary(const wxString & libname, bool *success); + /** 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); diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 0a161789d8..a72fd4dac1 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -221,6 +221,14 @@ wxDllLoader::LoadLibrary(const wxString & lib_name, bool *success) return handle; } + +/* static */ +void +wxDllLoader::UnloadLibrary(wxDllType handle) +{ + wxDllClose(handle); +} + /* static */ void * wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name) -- 2.45.2