www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/22/16:44:51

Message-ID: <32BD86E5.50CB@viemeister.com>
Date: Sun, 22 Dec 1996 15:07:17 -0400
From: Ian Viemeister <ian AT viemeister DOT com>
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>,
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?
References: <Pine DOT SUN DOT 3 DOT 91 DOT 961222190349 DOT 973H-100000 AT is>

Eli Zaretskii wrote:
> 
> 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?

Yes, both NT 3.51 and 4.0 both return 0x532.
Win95 returns 0x700 (DOS v7 huh?)

Ian Viemeister
ian AT viemeister DOT com

- Raw text -


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