fixed win7 start

This commit is contained in:
John Preston 2015-08-16 18:27:34 +03:00
parent 8259314721
commit 2039cd4660

View File

@ -714,13 +714,15 @@ namespace {
setupUx();
setupShell();
setupWtsapi();
setupPropSys();
setupCombase();
useTheme = !!setWindowTheme;
}
void setupUx() {
HINSTANCE procId = LoadLibrary(L"UXTHEME.DLL");
if (!loadFunction(procId, "SetWindowTheme", setWindowTheme)) return;
useTheme = true;
loadFunction(procId, "SetWindowTheme", setWindowTheme);
}
void setupShell() {
HINSTANCE procId = LoadLibrary(L"SHELL32.DLL");
@ -758,7 +760,12 @@ namespace {
HINSTANCE procId = LoadLibrary(L"COMBASE.DLL");
setupToast(procId);
}
void setupPropSys() {
HINSTANCE procId = LoadLibrary(L"PROPSYS.DLL");
if (!loadFunction(procId, "PropVariantToString", procId)) return;
}
void setupToast(HINSTANCE procId) {
if (!propVariantToString) return;
if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS8) return;
if (!loadFunction(procId, "RoGetActivationFactory", roGetActivationFactory)) return;
@ -766,9 +773,6 @@ namespace {
if (!loadFunction(otherProcId, "WindowsCreateStringReference", windowsCreateStringReference)) return;
if (!loadFunction(otherProcId, "WindowsDeleteString", windowsDeleteString)) return;
HINSTANCE otherOtherProcId = LoadLibrary(L"PROPSYS.DLL");
if (!loadFunction(otherOtherProcId, "PropVariantToString", propVariantToString)) return;
useToast = true;
}
};
@ -2822,6 +2826,8 @@ QString pinnedPath() {
}
void CheckPinnedAppUserModelId() {
if (!propVariantToString) return;
static const int maxFileLen = MAX_PATH * 10;
HRESULT hr = CoInitialize(0);