delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/24/09:00:40

From: "DeHackEd" <dehacked72 AT nospam DOT hotmail DOT com>
References: <B0B1D71B83 AT AKF DOT DK> <349FB075 DOT 80BEC634 AT cornell DOT edu>
Subject: Re: Determining Operating System
Date: Wed, 24 Dec 1997 08:53:46 -0500
Lines: 43
Message-ID: <#wCLWLHE9GA.347@upnetnews02.moswest.msn.net>
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

A. Sinan Unur wrote in message <349FB075 DOT 80BEC634 AT cornell DOT edu>...
>Finn Kettner wrote:
><snip>
>
>> PS. We are only using Windows 3.11, W95 and WinNT, and it is the
>> destinction between the three operating systems I'd like to make.
>
>here's something i used some time ago, which (i think) distinguishes
>between win 3.1x and win95. i think the way to disinguish nt is that it
>returns a unique dos version, but i am not sure.
>
[snip]
>
>batch file:
>
[chop]
>
>if you want, you can compile the following asm to a com using nasm (the
>resulting executable will be tiny compared to the djgpp version):
>
[clip]
>
>hth.
>--
>----------------------------------------------------------------------
>A. Sinan Unur
>Department of Policy Analysis and Management, College of Human Ecology,
>Cornell University, Ithaca, NY 14853, USA
>
>mailto:sinan DOT unur AT cornell DOT edu
>http://www.people.cornell.edu/pages/asu1/

Why not take a look at allegro's routines? It has to detect Windows if you
intend to use the timer safely. Windows ver 4 is 95, 0x100 is NT, 3 is 3.x (you
get the idea).

Just a word of caution: Windows 95 (maybe NT) can disable the check your showed
above from MS-DOS prompt's advanced properties. I wish there were an easier way
of doing something like this, because it's not "good" for some programs and
Windows.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019