Solved

Which Windows running behind my prog?

Posted on 1997-07-04
6
185 Views
Last Modified: 2010-04-06
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
Comment
Question by:Gabor
6 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1338184
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
 
LVL 1

Author Comment

by:Gabor
ID: 1338185
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
 
LVL 1

Expert Comment

by:fsanchez
ID: 1338186
There is a GetVersion function that exists both on 16 and 32 bits.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 1

Author Comment

by:Gabor
ID: 1338187
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
 
LVL 2

Accepted Solution

by:
icampbe1 earned 50 total points
ID: 1338188
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
 
LVL 1

Author Comment

by:Gabor
ID: 1338189
Thanx
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now