delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/20/18:13:15

From: Richard Dawe <richdawe AT bigfoot DOT com>
Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.programmer
Subject: Re: Detecting Windows and Windows directory from DOS
Date: Mon, 20 Mar 2000 20:04:27 +0000
Organization: Customer of Planet Online
Lines: 43
Message-ID: <38D6844B.876E5631@bigfoot.com>
References: <8am5ub$o0v$1 AT news6 DOT svr DOT pol DOT co DOT uk> <38D108E3 DOT D9821E3B AT americasm01 DOT nt DOT com> <8arkm8$m3h$1 AT newsg2 DOT svr DOT pol DOT co DOT uk> <qft2dsk6mso6suit8q0aikucnffq0cb77q AT 4ax DOT com> <38D1EFAA DOT 7A48D29D AT is DOT elta DOT co DOT il>
NNTP-Posting-Host: modem-211.jewel-puffer.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news6.svr.pol.co.uk 953589216 28534 62.137.33.211 (20 Mar 2000 21:53:36 GMT)
NNTP-Posting-Date: 20 Mar 2000 21:53:36 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.14 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

Eli Zaretskii wrote:
> The way to access the registry from DOS programs is known and well
> documented.
> There's a book called "Inside the Windows 95 Registry" which tells the
> story and shows code.

From what I can recall, this book does not contain enough information for
programs working in 32-bit protected mode. Something to do with the value
of the SS & BP registers before and after calls, although that's just a
hazy recollection.

> There's a library compatible with DJGPP (called regdos or something)
> which can do that.  Look it up.

Regdos seems to have vanished, reappeared and then vanished again - or
rather, the author's home page has disappeared. Anyway, I just discovered
that I put a copy of it here:

http://www.phekda.freeserve.co.uk/richdawe/mysoft.html#homeless

Eli, it might be a good idea to add this to the DJGPP FAQ. ;) I had
honestly completely forgotten that I had it on my web page! I only
discovered it when I was making some mods to that page.

> > Why doesn't it just store its registry as text like GNU/Linux does?
>
> Because Microsoft never meant for applications to access this
> information.

They broke their own rules quickly then!

FWIW this registry code is reliable. libsocket uses it to get all sorts of
TCP/IP information from the registry. I don't recommend this method to
anyone. It's pretty broken. If you can avoid using the registry, use some
other method.

Bye,

-- 
Richard Dawe
richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/

- Raw text -


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