Board index » delphi » How to access Environment Variables

How to access Environment Variables

In 3.x you could easily get at the environment by the following:

P:=GetDosEnvironment;
repeat
        P:=P+StrLen(P)+1;
until P^=#0;

How do you accesss the environment in W95 and NT ?

 

Re:How to access Environment Variables


On Thu, 16 Oct 1997 07:49:14 GMT, mc...@binnie.demon.co.uk (Mike Lai)
wrote:

Quote
>In 3.x you could easily get at the environment by the following:

>P:=GetDosEnvironment;
>repeat
>    P:=P+StrLen(P)+1;
>until P^=#0;

>How do you accesss the environment in W95 and NT ?

Download the Environ unit from http://www.tempest-sw.com/freeware/. It
has easy access to environment variables completely portably across
all versions of Delphi.
--
Ray Lischner (http://www.tempest-sw.com/)
Author of "Hidden Paths of Delphi 3: Experts, Wizards, and the Open Tools API"

Other Threads