Mail Archives: djgpp/2000/04/07/12:30:09
On Mon, 3 Apr 2000, Mark Geisert wrote:
> When NT creates a new process, the process' FS register contains a selector
> that can be used to address the TEB, Thread Environment Block. There is a
> way to use this to get the Windows version. This is how GetVersion() works,
> BTW, it's not a wrapper on a syscall but a bunch of load-relatives from FS.
>
> Is the FS register available with it's original contents to DJGPP-built
> programs running from a Command Prompt window?
FS is used for the interface between the stub loader and the COFF
executable. So, if we are to use this, stub.asm will need to be
changed to save away the contents of FS somewhere where it could be
accessed from the main program.
Assuming that this special selector is known, how would one go about
using it to access the Windows version?
- Raw text -