mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-04 06:11:17 +00:00
fixed win7 start
This commit is contained in:
parent
8259314721
commit
2039cd4660
@ -714,13 +714,15 @@ namespace {
|
|||||||
setupUx();
|
setupUx();
|
||||||
setupShell();
|
setupShell();
|
||||||
setupWtsapi();
|
setupWtsapi();
|
||||||
|
setupPropSys();
|
||||||
setupCombase();
|
setupCombase();
|
||||||
|
|
||||||
|
useTheme = !!setWindowTheme;
|
||||||
}
|
}
|
||||||
void setupUx() {
|
void setupUx() {
|
||||||
HINSTANCE procId = LoadLibrary(L"UXTHEME.DLL");
|
HINSTANCE procId = LoadLibrary(L"UXTHEME.DLL");
|
||||||
|
|
||||||
if (!loadFunction(procId, "SetWindowTheme", setWindowTheme)) return;
|
loadFunction(procId, "SetWindowTheme", setWindowTheme);
|
||||||
useTheme = true;
|
|
||||||
}
|
}
|
||||||
void setupShell() {
|
void setupShell() {
|
||||||
HINSTANCE procId = LoadLibrary(L"SHELL32.DLL");
|
HINSTANCE procId = LoadLibrary(L"SHELL32.DLL");
|
||||||
@ -758,7 +760,12 @@ namespace {
|
|||||||
HINSTANCE procId = LoadLibrary(L"COMBASE.DLL");
|
HINSTANCE procId = LoadLibrary(L"COMBASE.DLL");
|
||||||
setupToast(procId);
|
setupToast(procId);
|
||||||
}
|
}
|
||||||
|
void setupPropSys() {
|
||||||
|
HINSTANCE procId = LoadLibrary(L"PROPSYS.DLL");
|
||||||
|
if (!loadFunction(procId, "PropVariantToString", procId)) return;
|
||||||
|
}
|
||||||
void setupToast(HINSTANCE procId) {
|
void setupToast(HINSTANCE procId) {
|
||||||
|
if (!propVariantToString) return;
|
||||||
if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS8) return;
|
if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS8) return;
|
||||||
if (!loadFunction(procId, "RoGetActivationFactory", roGetActivationFactory)) return;
|
if (!loadFunction(procId, "RoGetActivationFactory", roGetActivationFactory)) return;
|
||||||
|
|
||||||
@ -766,9 +773,6 @@ namespace {
|
|||||||
if (!loadFunction(otherProcId, "WindowsCreateStringReference", windowsCreateStringReference)) return;
|
if (!loadFunction(otherProcId, "WindowsCreateStringReference", windowsCreateStringReference)) return;
|
||||||
if (!loadFunction(otherProcId, "WindowsDeleteString", windowsDeleteString)) return;
|
if (!loadFunction(otherProcId, "WindowsDeleteString", windowsDeleteString)) return;
|
||||||
|
|
||||||
HINSTANCE otherOtherProcId = LoadLibrary(L"PROPSYS.DLL");
|
|
||||||
if (!loadFunction(otherOtherProcId, "PropVariantToString", propVariantToString)) return;
|
|
||||||
|
|
||||||
useToast = true;
|
useToast = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -2822,6 +2826,8 @@ QString pinnedPath() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CheckPinnedAppUserModelId() {
|
void CheckPinnedAppUserModelId() {
|
||||||
|
if (!propVariantToString) return;
|
||||||
|
|
||||||
static const int maxFileLen = MAX_PATH * 10;
|
static const int maxFileLen = MAX_PATH * 10;
|
||||||
|
|
||||||
HRESULT hr = CoInitialize(0);
|
HRESULT hr = CoInitialize(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user