getting the version number from Windows

>I'm  trying to develop a 16 bits  application wich behaves different
>depending on the Windows version, to make  the appropiate Windows API calls,
>for instance under Windows 3.x, it should use some non-Win32 calls to do the
>actual work, on the other hand if it detects any Win32 enviroment it must
>take specific actions in order to use the Win32's functions from it's 16
bits
>plattaform.
>
>I made an attempt to get this information by using  GetVersion API function
>but it returns different results depending on the System version. I tested a
>little app under Windows 95 (first compiled with Delphi 1)  , 98 and NT
(this
>time compiled by Delphi 3.0) and I was unable to come to any conclusion by
>simply examining the function results.
>
>Ufff !!! it's been really hard for me to write these message especially
>because my english is not rich at all, so I'm starting to apologize since
>right now.
>
>Summarizing How I can differentiate the Windows version by using GetVersion
>function on a 16 bits Delphi 1.0 application ?
----------
function IsWin95: Boolean;
begin
Result := (GetVersion div 256) mod 256 = 95;
end;

-----
Subject:  Re: getting the version number from Windows

Try this code
var
     flags: LongInt;
begin
     flags := GetWinFlags;
     if flags >= $2000 then
{Win32}
     else
{Win 16}
end;