From e38b7cd46504579206499bd9dc3abe87c3d9b9ed Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 17 Jun 2016 15:38:08 +0300 Subject: [PATCH] Fixed dynamic library loading for Windows XP. Versioned dll removed, loading from combase.dll instead. --- Telegram/SourceFiles/platform/win/windows_dlls.cpp | 7 ++----- Telegram/SourceFiles/pspecific_win.cpp | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/platform/win/windows_dlls.cpp b/Telegram/SourceFiles/platform/win/windows_dlls.cpp index ae7bef04e..048aed929 100644 --- a/Telegram/SourceFiles/platform/win/windows_dlls.cpp +++ b/Telegram/SourceFiles/platform/win/windows_dlls.cpp @@ -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 diff --git a/Telegram/SourceFiles/pspecific_win.cpp b/Telegram/SourceFiles/pspecific_win.cpp index e75983310..effc56d8a 100644 --- a/Telegram/SourceFiles/pspecific_win.cpp +++ b/Telegram/SourceFiles/pspecific_win.cpp @@ -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); }