Solved

Which Windows running behind my prog?

Posted on 1997-07-04
6
200 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

717 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