Don't load SetCurrentProcessExplicitAppUserModelID dynamically

It's supported since Windows 7
This commit is contained in:
Ilya Fedin 2023-08-11 03:58:10 +04:00 committed by John Preston
parent 8c9014fcf6
commit 47195e316f
3 changed files with 2 additions and 9 deletions

View File

@ -107,11 +107,7 @@ crl::time LastSettingsQueryMs/* = 0*/;
}
bool init() {
if (!IsWindows8OrGreater()) {
return false;
}
if ((Dlls::SetCurrentProcessExplicitAppUserModelID == nullptr)
|| !base::WinRT::Supported()) {
if (!IsWindows8OrGreater() || !base::WinRT::Supported()) {
return false;
}
@ -128,7 +124,7 @@ bool init() {
}
auto appUserModelId = AppUserModelId::getId();
if (!SUCCEEDED(Dlls::SetCurrentProcessExplicitAppUserModelID(appUserModelId))) {
if (!SUCCEEDED(SetCurrentProcessExplicitAppUserModelID(appUserModelId))) {
return false;
}
return true;

View File

@ -34,7 +34,6 @@ SafeIniter::SafeIniter() {
LOAD_SYMBOL(LibShell32, OpenAs_RunDLL);
LOAD_SYMBOL(LibShell32, SHQueryUserNotificationState);
LOAD_SYMBOL(LibShell32, SHChangeNotify);
LOAD_SYMBOL(LibShell32, SetCurrentProcessExplicitAppUserModelID);
//if (IsWindows10OrGreater()) {
// static const auto kSystemVersion = QOperatingSystemVersion::current();

View File

@ -65,8 +65,6 @@ inline void(__stdcall *SHChangeNotify)(
UINT uFlags,
__in_opt LPCVOID dwItem1,
__in_opt LPCVOID dwItem2);
inline HRESULT(__stdcall *SetCurrentProcessExplicitAppUserModelID)(
__in PCWSTR AppID);
// PROPSYS.DLL