reactos/base/applications/winver/winver.c
Thamatip Chitpong a610016952
[WINVER] Display compatibility information (#7661)
Also don't hardcode the OS name. This make it compatible with Windows.
2025-02-08 00:05:03 +07:00

35 lines
1,009 B
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Version Program
* FILE: base/applications/winver/winver.c
*/
#include "winver_p.h"
HINSTANCE Winver_hInstance;
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
INITCOMMONCONTROLSEX iccx;
WINVER_OS_INFO OSInfo;
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
UNREFERENCED_PARAMETER(nCmdShow);
Winver_hInstance = hInstance;
/* Initialize common controls */
iccx.dwSize = sizeof(iccx);
iccx.dwICC = ICC_STANDARD_CLASSES | ICC_WIN95_CLASSES;
InitCommonControlsEx(&iccx);
if (!Winver_GetOSInfo(&OSInfo))
{
/* OS info is not available, display the default contents */
StringCchCopyW(OSInfo.szName, _countof(OSInfo.szName), L"ReactOS");
OSInfo.szCompatInfo[0] = UNICODE_NULL;
}
return ShellAboutW(NULL, OSInfo.szName, OSInfo.szCompatInfo, NULL);
}