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.
LVL 1
GaborAsked:
Who is Participating?
 
icampbe1Connect With a Mentor Commented:
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
 
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
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
fsanchezCommented:
There is a GetVersion function that exists both on 16 and 32 bits.
0
 
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
 
GaborAuthor Commented:
Thanx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.