> > Please see my previous post, I use it but.. obviously you have to 
> > check the result, because on my system it randomly returns one item 
> > that is not a valid name/value pair i.e. "=::=::\".

> procedure DumpEnvironment;
> var
>     P, Q : PChar;
> begin
>     P := GetEnvironmentStrings;
>     if P = nil then
>         Exit;
> 
>     // Environment is stored as a nul terminated string name=value.
>     // Last couple is followed by two nul values
>     while P^ <> #0 do begin
>         Q := P;
>         while P^ <> #0 do
>             Inc(P);
>         // WriteLn(q, '<BR>');
          Form1.Memo1.Lines.Add(q);  [CHANGE]
>         Inc(P);
>     end;
> end;
> 
> Can you check on your system and see if it gives bad data ?

I tried this code (with the change above) on Windows 2000 and XP Pro, and
also got "=::=::\" as the first string.

Regards,
Tom

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thomas Hahn
Hahn Technology, Inc.
Mailto:[EMAIL PROTECTED]
http://www.hahntech.com 
~~~~~~~~~~~~~~~~~~~~~~~~~~~ 


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to