Solved

Which Windows running behind my prog?

Posted on 1997-07-04
6
197 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
Industry Leaders: 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

696 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