Message-ID: <32BD86E5.50CB@viemeister.com> Date: Sun, 22 Dec 1996 15:07:17 -0400 From: Ian Viemeister MIME-Version: 1.0 To: Eli Zaretskii CC: Shawn Hargreaves , Henrik Abelsson , Jan Hubicka , djgpp AT delorie DOT com Subject: Re: SV: djgpp + allegro + win NT? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 > > 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