diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_core/src/colourpicker.cpp | 4 | ||||
-rw-r--r-- | src/mir_core/src/hyperlink.cpp | 16 | ||||
-rw-r--r-- | src/mir_core/src/langpack.cpp | 48 | ||||
-rw-r--r-- | src/mir_core/src/miranda.cpp | 10 | ||||
-rw-r--r-- | src/mir_core/src/miranda.h | 2 | ||||
-rw-r--r-- | src/mir_core/src/modules.cpp | 8 | ||||
-rw-r--r-- | src/mir_core/src/threads.cpp | 6 | ||||
-rw-r--r-- | src/mir_core/src/winver.cpp | 297 | ||||
-rw-r--r-- | src/miranda32/res/miranda32.exe.manifest | 10 |
9 files changed, 347 insertions, 54 deletions
diff --git a/src/mir_core/src/colourpicker.cpp b/src/mir_core/src/colourpicker.cpp index 75d0650431..d212c3ea33 100644 --- a/src/mir_core/src/colourpicker.cpp +++ b/src/mir_core/src/colourpicker.cpp @@ -55,7 +55,7 @@ static LRESULT CALLBACK ColourPickerWndProc(HWND hwnd, UINT message, WPARAM wPar CHOOSECOLOR cc = { 0 };
cc.lStructSize = sizeof(CHOOSECOLOR);
cc.hwndOwner = hwnd;
- cc.hInstance = (HWND)hInst;
+ cc.hInstance = (HWND)g_hInst;
cc.rgbResult = GetWindowLongPtr(hwnd, 0);
cc.lpCustColors = custColours;
cc.Flags = CC_ANYCOLOR | CC_FULLOPEN | CC_RGBINIT;
@@ -97,7 +97,7 @@ void InitColourPicker(void) WNDCLASS wcl = { 0 };
wcl.lpfnWndProc = ColourPickerWndProc;
wcl.cbWndExtra = sizeof(COLORREF) * 2;
- wcl.hInstance = hInst;
+ wcl.hInstance = g_hInst;
wcl.lpszClassName = _T(WNDCLASS_COLOURPICKER);
wcl.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
wcl.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
diff --git a/src/mir_core/src/hyperlink.cpp b/src/mir_core/src/hyperlink.cpp index b4530b6e81..524152cb20 100644 --- a/src/mir_core/src/hyperlink.cpp +++ b/src/mir_core/src/hyperlink.cpp @@ -81,17 +81,17 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA case WM_GETDLGCODE:
if (lParam) {
- MSG *msg = (MSG *)lParam;
- if (msg->message == WM_KEYDOWN) {
- if (msg->wParam == VK_TAB)
+ MSG *pMsg = (MSG *)lParam;
+ if (pMsg->message == WM_KEYDOWN) {
+ if (pMsg->wParam == VK_TAB)
return 0;
- if (msg->wParam == VK_ESCAPE)
+ if (pMsg->wParam == VK_ESCAPE)
return 0;
}
- else if (msg->message == WM_CHAR) {
- if (msg->wParam == '\t')
+ else if (pMsg->message == WM_CHAR) {
+ if (pMsg->wParam == '\t')
return 0;
- if (msg->wParam == 27)
+ if (pMsg->wParam == 27)
return 0;
}
}
@@ -267,7 +267,7 @@ void InitHyperlink(void) WNDCLASS wcl = { 0 };
wcl.lpfnWndProc = HyperlinkWndProc;
wcl.cbWndExtra = sizeof(struct HyperlinkWndData*);
- wcl.hInstance = hInst;
+ wcl.hInstance = g_hInst;
wcl.lpszClassName = WNDCLASS_HYPERLINK;
wcl.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS | CS_PARENTDC;
RegisterClass(&wcl); /* automatically unregistered on exit */
diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp index c93dee0a3e..e28e07d21e 100644 --- a/src/mir_core/src/langpack.cpp +++ b/src/mir_core/src/langpack.cpp @@ -223,18 +223,18 @@ static void LoadLangPackFile(FILE *fp, char *line) if (p)
*p = '\\';
- FILE *fp = _tfopen(tszFileName, _T("r"));
- if (fp) {
+ FILE *fpNew = _tfopen(tszFileName, _T("r"));
+ if (fpNew) {
line[0] = 0;
- fgets(line, LANGPACK_BUF_SIZE, fp);
+ fgets(line, LANGPACK_BUF_SIZE, fpNew);
if (strlen(line) >= 3 && line[0] == '\xef' && line[1] == '\xbb' && line[2] == '\xbf')
- fseek(fp, 3, SEEK_SET);
+ fseek(fpNew, 3, SEEK_SET);
else
- fseek(fp, 0, SEEK_SET);
+ fseek(fpNew, 0, SEEK_SET);
- LoadLangPackFile(fp, line);
- fclose(fp);
+ LoadLangPackFile(fpNew, line);
+ fclose(fpNew);
}
}
else if (!memcmp(line + 1, "muuid", 5)) {
@@ -508,19 +508,19 @@ MIR_CORE_DLL(TCHAR*) Langpack_PcharToTchar(const char *pszStr) /////////////////////////////////////////////////////////////////////////////////////////
-MIR_CORE_DLL(char*) TranslateA_LP(const char *str, int hLangpack)
+MIR_CORE_DLL(char*) TranslateA_LP(const char *str, int _hLangpack)
{
- return (char*)LangPackTranslateString(Langpack_LookupUuid(hLangpack), str, FALSE);
+ return (char*)LangPackTranslateString(Langpack_LookupUuid(_hLangpack), str, FALSE);
}
-MIR_CORE_DLL(WCHAR*) TranslateW_LP(const WCHAR *str, int hLangpack)
+MIR_CORE_DLL(WCHAR*) TranslateW_LP(const WCHAR *str, int _hLangpack)
{
- return (WCHAR*)LangPackTranslateString(Langpack_LookupUuid(hLangpack), (LPCSTR)str, TRUE);
+ return (WCHAR*)LangPackTranslateString(Langpack_LookupUuid(_hLangpack), (LPCSTR)str, TRUE);
}
-MIR_CORE_DLL(void) TranslateMenu_LP(HMENU hMenu, int hLangpack)
+MIR_CORE_DLL(void) TranslateMenu_LP(HMENU hMenu, int _hLangpack)
{
- MUUID *uuid = Langpack_LookupUuid(hLangpack);
+ MUUID *uuid = Langpack_LookupUuid(_hLangpack);
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
@@ -542,7 +542,7 @@ MIR_CORE_DLL(void) TranslateMenu_LP(HMENU hMenu, int hLangpack) }
if (mii.hSubMenu != NULL)
- TranslateMenu_LP(mii.hSubMenu, hLangpack);
+ TranslateMenu_LP(mii.hSubMenu, _hLangpack);
}
}
@@ -556,16 +556,10 @@ static void TranslateWindow(MUUID *pUuid, HWND hwnd) SetWindowText(hwnd, result);
}
-struct LANGPACKTRANSLATEDIALOG
-{
- HWND hwndDlg;
- int hLangpack;
-};
-
static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd, LPARAM lParam)
{
- int hLangpack = (int)lParam;
- MUUID *uuid = Langpack_LookupUuid(hLangpack);
+ int _hLangpack = (int)lParam;
+ MUUID *uuid = Langpack_LookupUuid(_hLangpack);
TCHAR szClass[32];
GetClassName(hwnd, szClass, _countof(szClass));
@@ -578,10 +572,10 @@ static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd, LPARAM lParam) return TRUE;
}
-MIR_CORE_DLL(void) TranslateDialog_LP(HWND hDlg, int hLangpack)
+MIR_CORE_DLL(void) TranslateDialog_LP(HWND hDlg, int _hLangpack)
{
- TranslateWindow(Langpack_LookupUuid(hLangpack), hDlg);
- EnumChildWindows(hDlg, TranslateDialogEnumProc, hLangpack);
+ TranslateWindow(Langpack_LookupUuid(_hLangpack), hDlg);
+ EnumChildWindows(hDlg, TranslateDialogEnumProc, _hLangpack);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -683,8 +677,8 @@ void GetDefaultLang() }
} while (FindNextFile(hFind, &fd));
FindClose(hFind);
- } else
- db_set_ts(NULL, "Langpack", "Current", _T("default"));
+ }
+ else db_set_ts(NULL, "Langpack", "Current", _T("default"));
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_core/src/miranda.cpp b/src/mir_core/src/miranda.cpp index c1c0518444..ac022681dd 100644 --- a/src/mir_core/src/miranda.cpp +++ b/src/mir_core/src/miranda.cpp @@ -41,7 +41,7 @@ void InitTimeZones(); void InitWinver();
int hLangpack = 0;
-HINSTANCE hInst = 0;
+HINSTANCE g_hInst = 0;
HANDLE hStackMutex, hThreadQueueEmpty;
DWORD mir_tls = 0;
@@ -52,8 +52,8 @@ static INT_PTR RestartMiranda(WPARAM wParam, LPARAM) {
TCHAR mirandaPath[MAX_PATH], cmdLine[MAX_PATH];
PROCESS_INFORMATION pi;
- STARTUPINFO si = { 0 };
- si.cb = sizeof(si);
+ STARTUPINFO startupInfo = { 0 };
+ startupInfo.cb = sizeof(startupInfo);
GetModuleFileName(NULL, mirandaPath, _countof(mirandaPath));
if (wParam) {
VARST profilename(_T("%miranda_profilename%"));
@@ -62,7 +62,7 @@ static INT_PTR RestartMiranda(WPARAM wParam, LPARAM) else mir_sntprintf(cmdLine, _countof(cmdLine), _T("\"%s\" /restart:%d"), mirandaPath, GetCurrentProcessId());
CallService("CloseAction", 0, 0);
- CreateProcess(mirandaPath, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
+ CreateProcess(mirandaPath, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &pi);
return 0;
}
@@ -135,7 +135,7 @@ MIR_CORE_DLL(void) UnloadCoreModule(void) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID)
{
if (fdwReason == DLL_PROCESS_ATTACH) {
- hInst = hinstDLL;
+ g_hInst = hinstDLL;
mir_tls = TlsAlloc();
LoadCoreModule();
}
diff --git a/src/mir_core/src/miranda.h b/src/mir_core/src/miranda.h index 525a99d1d9..9d854e4f8c 100644 --- a/src/mir_core/src/miranda.h +++ b/src/mir_core/src/miranda.h @@ -37,7 +37,7 @@ int InitPathUtils(void); HINSTANCE ProtoGetInstance(const char *szModuleName);
-extern HINSTANCE hInst;
+extern HINSTANCE g_hInst;
extern HWND hAPCWindow;
extern HANDLE hStackMutex, hThreadQueueEmpty;
extern MIDatabase *currDb;
diff --git a/src/mir_core/src/modules.cpp b/src/mir_core/src/modules.cpp index 4a7df365b5..86bff8146f 100644 --- a/src/mir_core/src/modules.cpp +++ b/src/mir_core/src/modules.cpp @@ -76,7 +76,7 @@ TServiceToMainThreadItem; static BOOL bServiceMode = FALSE; static mir_cs csHooks, csServices; static DWORD mainThreadId; -static int hookId = 1; +static int sttHookId = 1; ///////////////////////////////////////////////////////////////////////////////////////// @@ -115,7 +115,7 @@ MIR_CORE_DLL(HANDLE) CreateHookableEvent(const char *name) THook *newItem = (THook*)mir_alloc(sizeof(THook)); strncpy(newItem->name, name, sizeof(newItem->name)); newItem->name[MAXMODULELABELLENGTH - 1] = 0; - newItem->id = hookId++; + newItem->id = sttHookId++; newItem->subscriberCount = 0; newItem->subscriber = NULL; newItem->pfnHook = NULL; @@ -643,8 +643,8 @@ MIR_CORE_DLL(HINSTANCE) GetInstByAddress(void* codePtr) idx--; HINSTANCE result = pluginListAddr[idx]; - if (result < hInst && codePtr > hInst) - result = hInst; + if (result < g_hInst && codePtr > g_hInst) + result = g_hInst; else if (idx == 0 && codePtr < (void*)result) result = NULL; diff --git a/src/mir_core/src/threads.cpp b/src/mir_core/src/threads.cpp index 16b5d4d993..23f34cf835 100644 --- a/src/mir_core/src/threads.cpp +++ b/src/mir_core/src/threads.cpp @@ -73,11 +73,11 @@ MIR_CORE_DLL(pfnExceptionFilter) GetExceptionFilter() return pMirandaExceptFilter;
}
-MIR_CORE_DLL(pfnExceptionFilter) SetExceptionFilter(pfnExceptionFilter pMirandaExceptFilter)
+MIR_CORE_DLL(pfnExceptionFilter) SetExceptionFilter(pfnExceptionFilter _mirandaExceptFilter)
{
pfnExceptionFilter oldOne = pMirandaExceptFilter;
- if (pMirandaExceptFilter != 0)
- pMirandaExceptFilter = pMirandaExceptFilter;
+ if (_mirandaExceptFilter != 0)
+ pMirandaExceptFilter = _mirandaExceptFilter;
return oldOne;
}
diff --git a/src/mir_core/src/winver.cpp b/src/mir_core/src/winver.cpp index bf40d2a2fa..71b7969f77 100644 --- a/src/mir_core/src/winver.cpp +++ b/src/mir_core/src/winver.cpp @@ -91,3 +91,300 @@ MIR_CORE_DLL(BOOL) IsScreenSaverRunning(void) SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, &rc, FALSE);
return rc != 0;
}
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef VER_SUITE_WH_SERVER
+#define VER_SUITE_WH_SERVER 0x00008000
+#endif
+
+#ifndef PRODUCT_ULTIMATE
+#define PRODUCT_UNDEFINED 0x00000000
+#define PRODUCT_ULTIMATE 0x00000001
+#define PRODUCT_HOME_BASIC 0x00000002
+#define PRODUCT_HOME_PREMIUM 0x00000003
+#define PRODUCT_ENTERPRISE 0x00000004
+#define PRODUCT_HOME_BASIC_N 0x00000005
+#define PRODUCT_BUSINESS 0x00000006
+#define PRODUCT_STANDARD_SERVER 0x00000007
+#define PRODUCT_DATACENTER_SERVER 0x00000008
+#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009
+#define PRODUCT_ENTERPRISE_SERVER 0x0000000A
+#define PRODUCT_STARTER 0x0000000B
+#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C
+#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D
+#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E
+#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F
+#define PRODUCT_BUSINESS_N 0x00000010
+#define PRODUCT_WEB_SERVER 0x00000011
+#define PRODUCT_CLUSTER_SERVER 0x00000012
+#define PRODUCT_HOME_SERVER 0x00000013
+#define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014
+#define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015
+#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016
+#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017
+#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018
+#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019
+#define PRODUCT_HOME_PREMIUM_N 0x0000001a
+#define PRODUCT_ENTERPRISE_N 0x0000001b
+#define PRODUCT_ULTIMATE_N 0x0000001c
+#define PRODUCT_WEB_SERVER_CORE 0x0000001d
+#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001e
+#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001f
+#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020
+#define PRODUCT_SERVER_FOUNDATION 0x00000021
+#define PRODUCT_HOME_PREMIUM_SERVER 0x00000022
+#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023
+#define PRODUCT_STANDARD_SERVER_V 0x00000024
+#define PRODUCT_DATACENTER_SERVER_V 0x00000025
+#define PRODUCT_ENTERPRISE_SERVER_V 0x00000026
+#define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027
+#define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028
+#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029
+#define PRODUCT_HYPERV 0x0000002a
+#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002b
+#define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002c
+#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002d
+#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002e
+#define PRODUCT_STARTER_N 0x0000002f
+#define PRODUCT_PROFESSIONAL 0x00000030
+#define PRODUCT_PROFESSIONAL_N 0x00000031
+#define PRODUCT_SB_SOLUTION_SERVER 0x00000032
+#define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033
+#define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034
+#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035
+#define PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036
+#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037
+#define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038
+#define PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE 0x00000039
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E
+#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003f
+#define PRODUCT_CLUSTER_SERVER_V 0x00000040
+#define PRODUCT_EMBEDDED 0x00000041
+#define PRODUCT_STARTER_E 0x00000042
+#define PRODUCT_HOME_BASIC_E 0x00000043
+#define PRODUCT_HOME_PREMIUM_E 0x00000044
+#define PRODUCT_PROFESSIONAL_E 0x00000045
+#define PRODUCT_ENTERPRISE_E 0x00000046
+#define PRODUCT_ULTIMATE_E 0x00000047
+#endif
+#ifndef PRODUCT_CORE_N // Win8
+#define PRODUCT_CORE_N 0x00000062
+#define PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063
+#define PRODUCT_CORE_SINGLELANGUAGE 0x00000064
+#define PRODUCT_CORE 0x00000065
+#define PRODUCT_PROFESSIONAL_WMC 0x00000067
+#define PRODUCT_UNLICENSED 0xABCDABCD
+#endif
+
+typedef BOOL(WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
+
+MIR_CORE_DLL(BOOL) GetOSDisplayString(TCHAR *buf, size_t bufSize)
+{
+ if (buf == NULL || bufSize == 0)
+ return 0;
+
+ buf[0] = 0;
+
+ OSVERSIONINFOEX osvi = { 0 };
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+ BOOL bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *)&osvi);
+ if (!bOsVersionInfoEx) {
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ if (!GetVersionEx((OSVERSIONINFO*)&osvi))
+ return FALSE;
+ }
+
+ if (VER_PLATFORM_WIN32_NT != osvi.dwPlatformId || osvi.dwMajorVersion <= 4)
+ return FALSE;
+
+ SYSTEM_INFO sysInfo = { 0 };
+ GetNativeSystemInfo(&sysInfo);
+
+ CMString ret(_T("Microsoft "));
+
+ // Test for the specific product.
+ if (osvi.dwMajorVersion >= 6) {
+ if (osvi.dwMajorVersion == 10) {
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ ret.Append(_T("Windows 10 "));
+ else
+ ret.Append(_T("Windows Server 10 "));
+ }
+ else switch (osvi.dwMinorVersion) {
+ case 0:
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ ret.Append(_T("Windows Vista "));
+ else
+ ret.Append(_T("Windows Server 2008 "));
+ break;
+
+ case 1:
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ ret.Append(_T("Windows 7 "));
+ else
+ ret.Append(_T("Windows Server 2008 R2 "));
+ break;
+
+ case 2:
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ ret.Append(_T("Windows 8 "));
+ else
+ ret.Append(_T("Windows Server 2012 "));
+ break;
+
+ case 3:
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ ret.Append(_T("Windows 8.1 "));
+ else
+ ret.Append(_T("Windows Server 2012 R2 "));
+ break;
+ }
+
+ DWORD dwType = 0;
+ HMODULE hKernel = GetModuleHandle(_T("kernel32.dll"));
+ PGPI pGPI = (PGPI)GetProcAddress(hKernel, "GetProductInfo");
+ if (pGPI != NULL)
+ pGPI(osvi.dwMajorVersion, osvi.dwMinorVersion, 0, 0, &dwType);
+
+ switch (dwType) {
+ case PRODUCT_ULTIMATE:
+ ret.Append(_T("Ultimate Edition"));
+ break;
+ case PRODUCT_PROFESSIONAL:
+ ret.Append(_T("Professional Edition"));
+ break;
+ case PRODUCT_PROFESSIONAL_WMC:
+ ret.Append(_T("Professional Edition with Media Center"));
+ break;
+ case PRODUCT_HOME_PREMIUM:
+ ret.Append(_T("Home Premium Edition"));
+ break;
+ case PRODUCT_HOME_BASIC:
+ ret.Append(_T("Home Basic Edition"));
+ break;
+ case PRODUCT_ENTERPRISE:
+ ret.Append(_T("Enterprise Edition"));
+ break;
+ case PRODUCT_BUSINESS:
+ ret.Append(_T("Business Edition"));
+ break;
+ case PRODUCT_STARTER:
+ ret.Append(_T("Starter Edition"));
+ break;
+ case PRODUCT_CLUSTER_SERVER:
+ ret.Append(_T("Cluster Server Edition"));
+ break;
+ case PRODUCT_DATACENTER_SERVER:
+ ret.Append(_T("Datacenter Edition"));
+ break;
+ case PRODUCT_DATACENTER_SERVER_CORE:
+ ret.Append(_T("Datacenter Edition (core installation)"));
+ break;
+ case PRODUCT_ENTERPRISE_SERVER:
+ ret.Append(_T("Enterprise Edition"));
+ break;
+ case PRODUCT_ENTERPRISE_SERVER_CORE:
+ ret.Append(_T("Enterprise Edition (core installation)"));
+ break;
+ case PRODUCT_ENTERPRISE_SERVER_IA64:
+ ret.Append(_T("Enterprise Edition for Itanium-based Systems"));
+ break;
+ case PRODUCT_SMALLBUSINESS_SERVER:
+ ret.Append(_T("Small Business Server"));
+ break;
+ case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM:
+ ret.Append(_T("Small Business Server Premium Edition"));
+ break;
+ case PRODUCT_STANDARD_SERVER:
+ ret.Append(_T("Standard Edition"));
+ break;
+ case PRODUCT_STANDARD_SERVER_CORE:
+ ret.Append(_T("Standard Edition (core installation)"));
+ break;
+ case PRODUCT_WEB_SERVER:
+ ret.Append(_T("Web Server Edition"));
+ break;
+ }
+ if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
+ ret.Append(_T(", 64-bit"));
+ else if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
+ ret.Append(_T(", 32-bit"));
+ }
+
+ if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) {
+ if (GetSystemMetrics(SM_SERVERR2))
+ ret.Append(_T("Windows Server 2003 R2, "));
+ else if (osvi.wSuiteMask == VER_SUITE_STORAGE_SERVER)
+ ret.Append(_T("Windows Storage Server 2003"));
+ else if (osvi.wSuiteMask == VER_SUITE_WH_SERVER)
+ ret.Append(_T("Windows Home Server"));
+ else if (osvi.wProductType == VER_NT_WORKSTATION && sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
+ ret.Append(_T("Windows XP Professional x64 Edition"));
+ else
+ ret.Append(_T("Windows Server 2003, "));
+
+ // Test for the server type.
+ if (osvi.wProductType != VER_NT_WORKSTATION) {
+ if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) {
+ if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
+ ret.Append(_T("Datacenter Edition for Itanium-based Systems"));
+ else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
+ ret.Append(_T("Enterprise Edition for Itanium-based Systems"));
+ }
+ else if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) {
+ if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
+ ret.Append(_T("Datacenter x64 Edition"));
+ else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
+ ret.Append(_T("Enterprise x64 Edition"));
+ else ret.Append(_T("Standard x64 Edition"));
+ }
+ else {
+ if (osvi.wSuiteMask & VER_SUITE_COMPUTE_SERVER)
+ ret.Append(_T("Compute Cluster Edition"));
+ else if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
+ ret.Append(_T("Datacenter Edition"));
+ else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
+ ret.Append(_T("Enterprise Edition"));
+ else if (osvi.wSuiteMask & VER_SUITE_BLADE)
+ ret.Append(_T("Web Edition"));
+ else ret.Append(_T("Standard Edition"));
+ }
+ }
+ }
+
+ if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) {
+ ret.Append(_T("Windows XP "));
+ if (osvi.wSuiteMask & VER_SUITE_PERSONAL)
+ ret.Append(_T("Home Edition"));
+ else ret.Append(_T("Professional"));
+ }
+
+ if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) {
+ ret.Append(_T("Windows 2000 "));
+
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ ret.Append(_T("Professional"));
+ else {
+ if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
+ ret.Append(_T("Datacenter Server"));
+ else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
+ ret.Append(_T("Advanced Server"));
+ else ret.Append(_T("Server"));
+ }
+ }
+
+ // Include service pack (if any) and build number.
+
+ if (mir_tstrlen(osvi.szCSDVersion) > 0) {
+ ret.Append(_T(" "));
+ ret.Append(osvi.szCSDVersion);
+ }
+
+ ret.AppendFormat(_T(" (build %d)"), osvi.dwBuildNumber);
+ mir_tstrncpy(buf, ret, bufSize);
+ return TRUE;
+}
diff --git a/src/miranda32/res/miranda32.exe.manifest b/src/miranda32/res/miranda32.exe.manifest index b0c140a148..a3b682f875 100644 --- a/src/miranda32/res/miranda32.exe.manifest +++ b/src/miranda32/res/miranda32.exe.manifest @@ -12,14 +12,16 @@ </trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
+ <!-- Windows 10 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
- <!-- Windows Vista -->
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
- <!-- Windows 7 -->
- <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ <!-- Windows Vista -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
</application>
</compatibility>
</assembly>
|