> 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. 
> 

Correct.  But none of this is needed in this case.  If the function 
GetCursorInfo() (for example) is not supported on NT4, then the
attempt to load its function pointer with 

  cursor = (GETCURSORINFO) GetProcAddress(user,"GetCursorInfo");

will fail.  This is the only type of runtime check that is needed.
It doesn't matter if the OS is Win95, NT4, or even Win2000 if the 
function pointer cannot be loaded.



                  Jeffrey Altman * Sr.Software Designer
                 The Kermit Project * Columbia University
               612 West 115th St * New York, NY * 10025 * USA
     http://www.kermit-project.org/ * [EMAIL PROTECTED]


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to