• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

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.
0
Gabor
Asked:
Gabor
1 Solution
 
ronit051397Commented:
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;

0
 
GaborAuthor Commented:
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.
0
 
fsanchezCommented:
There is a GetVersion function that exists both on 16 and 32 bits.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
GaborAuthor Commented:
Thanks fsanchez! It might be good, but I have to know the results of this function to determin the OS' version, don't I?
0
 
icampbe1Commented:
Using Delphi 1....

VAR Win95: BOOLEAN;

Win95 := LoWord(GetVersion) >= $5F03;

This can be used on a 16 platform using Delphi 1.  

Cheers,
Ian C.

0
 
GaborAuthor Commented:
Thanx
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now