Mail Archives: djgpp-workers/2001/05/04/09:19:57
> 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 -