X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c33522fca7cddc441a316f5b9fb50d7685435ba..e92b9e696c76c60084fe731fc242ef21050ecc52:/src/msw/dlmsw.cpp diff --git a/src/msw/dlmsw.cpp b/src/msw/dlmsw.cpp index 0b4d76de17..280dab0e28 100644 --- a/src/msw/dlmsw.cpp +++ b/src/msw/dlmsw.cpp @@ -282,9 +282,11 @@ wxDllType wxDynamicLibrary::GetProgramHandle() /* static */ wxDllType -wxDynamicLibrary::RawLoad(const wxString& libname, int WXUNUSED(flags)) +wxDynamicLibrary::RawLoad(const wxString& libname, int flags) { - return ::LoadLibrary(libname.t_str()); + return flags & wxDL_GET_LOADED + ? ::GetModuleHandle(libname.t_str()) + : ::LoadLibrary(libname.t_str()); } /* static */