Fixed dynamic library loading for Windows XP.

Versioned dll removed, loading from combase.dll instead.
This commit is contained in:
John Preston 2016-06-17 15:38:08 +03:00
parent d089d4e692
commit e38b7cd465
2 changed files with 3 additions and 6 deletions

View File

@ -43,7 +43,6 @@ HINSTANCE LibShell32;
HINSTANCE LibWtsApi32;
HINSTANCE LibPropSys;
HINSTANCE LibComBase;
HINSTANCE LibWinRtString;
void start() {
LibUxTheme = LoadLibrary(L"UXTHEME.DLL");
@ -66,10 +65,8 @@ void start() {
LibComBase = LoadLibrary(L"COMBASE.DLL");
load(LibComBase, "RoGetActivationFactory", RoGetActivationFactory);
LibWinRtString = LoadLibrary(L"api-ms-win-core-winrt-string-l1-1-0.dll");
load(LibWinRtString, "WindowsCreateStringReference", WindowsCreateStringReference);
load(LibWinRtString, "WindowsDeleteString", WindowsDeleteString);
load(LibComBase, "WindowsCreateStringReference", WindowsCreateStringReference);
load(LibComBase, "WindowsDeleteString", WindowsDeleteString);
}
} // namespace Dlls

View File

@ -98,7 +98,7 @@ namespace {
_PsInitializer() {
Dlls::start();
useOpenWith = (Dlls::SHAssocEnumHandlers != nullptr) && (SHCreateItemFromParsingName != nullptr);
useOpenWith = (Dlls::SHAssocEnumHandlers != nullptr) && (Dlls::SHCreateItemFromParsingName != nullptr);
useOpenAs = (Dlls::SHOpenWithDialog != nullptr) || (Dlls::OpenAs_RunDLL != nullptr);
useShellapi = (Dlls::SHQueryUserNotificationState != nullptr);
}