delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/04/09:19:57

Date: Fri, 04 May 2001 16:19:52 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: theowl AT freemail DOT c3 DOT hu
Message-Id: <7704-Fri04May2001161951+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com, sandmann AT clio DOT rice DOT edu
In-reply-to: <3AF29483.25527.47F6564@localhost> (theowl@freemail.c3.hu)
Subject: Re: win2000/ntvdm/djgpp (fwd)
References: <3AF1D04F DOT 23054 DOT 180FCC1 AT localhost> (theowl AT freemail DOT c3 DOT hu) <3AF29483 DOT 25527 DOT 47F6564 AT localhost>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "The Owl" <theowl AT freemail DOT c3 DOT hu>
> Date: Fri, 4 May 2001 11:37:39 +0200
> 
> Windows Version: 0.16h
> 
> on w2k/sp1, ie. it appears to be really 0.

That's really bad.  It means they've broken the Windows identification
code of many DOS programs.  RBIL says:

  INT 2F - MS Windows - WINDOWS ENHANCED MODE INSTALLATION CHECK
	  AX = 1600h
  Return: AL = status
	      00h neither Windows 3.x enhanced mode nor Windows/386 2.x running
	      01h Windows/386 2.x running
	      80h XMS version 1 driver installed (neither Windows 3.x enhanced
		    mode nor Windows/386 2.x running) (obsolete--see note)
	      FFh Windows/386 2.x running
	  AL = anything else
	      AL = Windows major version number >= 3
	      AH = Windows minor version number

What W2K returns in AX is simply 1600h with which it was called,
i.e. it fails the call!  It wants DOS programs to think they are not
running on Windows, presumably because W2K doesn't support the other
Int 2Fh functions which Windows 3.X and 9X support.

In other words, our only hope is the true DOS version of 5.50 returned
by _get_dos_version(1).  Sigh...

Does NT4 return the same results?  I guess it does...

> this brings up another possibility for detecting NT (and even various
> versions of it), provided you are willing to use certain Bop interfaces:
> you would do this by 'executing' an specific invalid opcode and detect
> if you trigger an invalid opcode exception or get back some result.

Yes, that's possible.

I think I'll first post code which uses DOS version 5.50 as the
trigger.  If the modified version of the library solves the NTVDM
crashes, we could next discuss whether this detection method is good
enough or an alternative is needed.

Thanks for the feedback, everybody.

- Raw text -


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