There are some way to determine the running OS, quote from the Win32 FAQ:

5.1.5 How can I tell what version of windows I'm running? 
With the function GetVersionEx(). This fills in a structure indicating whether
or not the OS is NT, and what the version number of the OS is 

BOOL  InWinNT() //test for NT nature
{
        OSVERSIONINFO osv;
        osv.dwOSVersionInfoSize=sizeof(osv);
        GetVersionEx(&osv);
        return osv.dwPlatformId==VER_PLATFORM_WIN32_NT;
}

The major and minor elements of the structure help to differentiate beween
versions more usefully than build number. NT4 is (NT, 4, 0), NT5 is (NT, 5, 0).
Win95 is (no NT, 4, 0) while '98 is (no NT, 4, 0x10), build 1998. Win98 SE is
build 2222 or later. 


-- 
(~._.~)  Öì Ⱥ Ó¢  (Qun-Ying)          (65) 874-6743
 ( O )   TrustCopy Pte Ltd / Kent Ridge Digital Labs
()~*~()  21 Heng Mui Keng Terrace,  Singapore 119613
(_)-(_)    [EMAIL PROTECTED]  *  [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to