www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/22/12:30:25

Date: Sun, 22 Dec 1996 19:09:20 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
cc: Henrik Abelsson <henrik AT mailbox DOT calypso DOT net>,
Jan Hubicka <hubicka AT ta DOT jcu DOT cz>, djgpp AT delorie DOT com
Subject: Re: SV: djgpp + allegro + win NT?
In-Reply-To: <3wmOLeAUsuuyEwkP@talula.demon.co.uk>
Message-ID: <Pine.SUN.3.91.961222190349.973H-100000@is>
MIME-Version: 1.0

On Fri, 20 Dec 1996, Shawn Hargreaves wrote:

> Does anyone know any other ways to detect Windows/NT?

One way to do that would be like so:

	#include <dos.h>

	if (_get_dos_version (1) == 0x0532)
	   /* we run in NT DOS box */
	else
	   /* some other environment */

My references indicate that DOS box on NT always returns version 5.50
(0532h) when you call DOS function 3306h (which is what `_get_dos_version'
does when called with a non-zero argument, see the libc docs).  Can people
who work on NT please see if that's true for both 3.5x and 4.0? 

- Raw text -


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