removed dependency on windows.h from dynload.h
Moved dlopen implementation into wxDynamicLibrary. Wrapped wxDllLoader in 2.2 compat guards and defined it in terms of the new classes. Added link option flags to wxDL and other missing functionality previously implemented in wxDllLoader. Modified wxDL++ classes to use wxDL base class implementation. Replaced all uses of wxDllLoader in wx classes by the new classes as appropriate. def'd out (unimplemented) wxSystemSettingsBase so wxMSW would link. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1265,19 +1265,17 @@ wxString wxFileName::GetLongPath() const
|
||||
if ( !s_triedToLoad )
|
||||
{
|
||||
s_triedToLoad = TRUE;
|
||||
wxDllType dllKernel = wxDllLoader::LoadLibrary(_T("kernel32"));
|
||||
if ( dllKernel )
|
||||
wxDynamicLibrary dllKernel(_T("kernel32"));
|
||||
if ( dllKernel.IsLoaded() )
|
||||
{
|
||||
// may succeed or fail depending on the Windows version
|
||||
static GET_LONG_PATH_NAME s_pfnGetLongPathName = NULL;
|
||||
#ifdef _UNICODE
|
||||
s_pfnGetLongPathName = (GET_LONG_PATH_NAME) wxDllLoader::GetSymbol(dllKernel, _T("GetLongPathNameW"));
|
||||
s_pfnGetLongPathName = (GET_LONG_PATH_NAME) dllKernel.GetSymbol(_T("GetLongPathNameW"));
|
||||
#else
|
||||
s_pfnGetLongPathName = (GET_LONG_PATH_NAME) wxDllLoader::GetSymbol(dllKernel, _T("GetLongPathNameA"));
|
||||
s_pfnGetLongPathName = (GET_LONG_PATH_NAME) dllKernel.GetSymbol(_T("GetLongPathNameA"));
|
||||
#endif
|
||||
|
||||
wxDllLoader::UnloadLibrary(dllKernel);
|
||||
|
||||
if ( s_pfnGetLongPathName )
|
||||
{
|
||||
DWORD dwSize = (*s_pfnGetLongPathName)(path, NULL, 0);
|
||||
|
||||
Reference in New Issue
Block a user