#define W31 "Windows 3.1"
#define W95 "Windows 95"
#define W98 "Windows 98"
#define WME "Windows ME"
#define WNT4 "Windows NT 4.0"
#define W2K "Windows 2000"
#if defined(WIN32)
OSVERSIONINFO winfo;
winfo.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
GetVersionEx(&winfo);
if(winfo.dwPlatformId==VER_PLATFORM_WIN32_NT)
{
if(winfo.dwMajorVersion>=5)
return W2K;
else
return WNT4;
}
else
if(winfo.dwPlatformId==VER_PLATFORM_WIN32_WINDOWS
)
{
if(winfo.dwMinorVersion<10)
return W95;
else
if(winfo.dwMinorVersion<90)
return W98;
else
return WME;
}
else
if(winfo.dwPlatformId==VER_PLATFORM_WIN32s)
{
return W31;
}
return "?";
#endif