Mail Archives: djgpp-workers/2001/05/04/05:39:04
> > Windows Version: 00.16h
>
> The last one puzzles me: is the major Windows version indeed zero?
> What happens if you modify the last printf like so:
>
> printf ("Windows Version: %X.%.2Xh\n", r.h.al, r.h.ah);
Windows Version: 0.16h
on w2k/sp1, ie. it appears to be really 0.
> > i'm not sure how i can get them to execute (load into a ntvdm process)
>
> Try putting something in config.nt or autoexec.nt? Maybe search the
> MS Knowledge Base for these names?
well, these files are supposed to be the equivalent of msdos.sys which
is loaded before any of those two files is consulted (or so would i think).
from a quick look at ntvdm it seems that it is ntvdm that decides which
one to load, based on the return value from GetSystemDefaultLangID
(it is in kernel32.dll). also, i looked at some of these files and how
they setup the PSP at offset 40 (dos version) and it always seemed to
be 0005 (ie. 5.0).
> I hope that the "True DOS Version" should remain unchanged. If it
> does change, we are in trouble.
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. in
the latter case you would then know that you are under NT, and examining
the result would give you very specific ntvdm build info as there is
one specific Bop function that returns a flat address inside ntvdm which
i think is different for each build.
- Raw text -