Link to home
Start Free TrialLog in
Avatar of Gabor
Gabor

asked on

Which Windows running behind my prog?

I need to know, which version of Windows is running behind my program.
I have to determine if it's Win3.1 or Win95 with Delphi1.0.
Avatar of ronit051397
ronit051397

procedure TForm1.Button1Click(Sender: TObject);
var xxx: TOSversioninfo;
begin
  xxx.dwOSVersionInfoSize:=sizeof(TOSversioninfo);
  GetVersionEx(xxx);
  if xxx.dwPlatformId=0 then showmessage('3.11');
  if xxx.dwPlatformId=1 then showmessage('95');
  if xxx.dwPlatformId=2 then showmessage('NT');
end;

Avatar of Gabor

ASKER

Dear ronit,Thank you for fast answer, but it doesn't work for me.I have found this API function in Win32, but there isn't this function in the 16bit API.I need the function (or any other solution) in Win3.1 with 16bit API.
There is a GetVersion function that exists both on 16 and 32 bits.
Avatar of Gabor

ASKER

Thanks fsanchez! It might be good, but I have to know the results of this function to determin the OS' version, don't I?
ASKER CERTIFIED SOLUTION
Avatar of icampbe1
icampbe1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gabor

ASKER

Thanx