Rob Kennedy wrote:

> MSDN says this:
[..]
> Treat this memory as read-only; do not modify it directly. To add or
> change an environment variable, use the GetEnvironmentVariable and
> SetEnvironmentVariable functions.
[..]

That sounds of course more friendly, however the comment I quoted, taken from
the Windows95 developer handbook shipped with D7 clearly says:
"Do not use the return value of GetEnvironmentStrings to *get or *set
environment variables". Note the word get.
I ran plenty of tests and after 50 mouse klicks or so I got in fact a strange
string at the top of the list which doesn't represent a name/value pair.
It was "=::=::\", any idea? 

At least I guess it wouldn't hurt much to crosscheck all returned names by 
calling
GetEnvironmentVariable(), but what a hack to get just a few strings:(

Arno Garrels


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

Reply via email to