implement wxLoadedDLL, a safer alternative to wxDL_GET_LOADED (closes #10208)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -917,10 +917,7 @@ int wxApp::GetComCtl32Version()
|
||||
// depending on the OS version and the presence of the manifest, it can
|
||||
// be either v5 or v6 and instead of trying to guess it just get the
|
||||
// handle of the already loaded version
|
||||
wxDynamicLibrary dllComCtl32(_T("comctl32.dll"),
|
||||
wxDL_VERBATIM |
|
||||
wxDL_QUIET |
|
||||
wxDL_GET_LOADED);
|
||||
wxLoadedDLL dllComCtl32(_T("comctl32.dll"));
|
||||
if ( !dllComCtl32.IsLoaded() )
|
||||
{
|
||||
s_verComCtl32 = 0;
|
||||
@@ -958,9 +955,6 @@ int wxApp::GetComCtl32Version()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we shouldn't unload it here as we didn't really load it above
|
||||
dllComCtl32.Detach();
|
||||
}
|
||||
|
||||
return s_verComCtl32;
|
||||
|
Reference in New Issue
Block a user