Possible Duplicate:
What are these strange environment variables?
I'm trying to use GetEnvironmentStrings Win32API function to get environment variables and I receive some very strange key=value pairs (example enclosed with []):
[=::=::\]
[=C:=C:\Users\username\value]
[=ExitCode=00000001]
[ALLUSERSPROFILE=C:\ProgramData]
[APPDATA=C:\Users\artik\AppData\Roaming]
[CommonProgramFiles=C:\Program Files (x86)\Common Files]
[CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files]
[CommonProgramW6432=C:\Program Files\Common Files]
...
Obviously it does not seems to be a proper value for environment string as described there http://msdn.microsoft.com/en-us/library/windows/desktop/ms683187%28v=vs.85%29.aspx
Questions:
- What is the expected behavior?
- If there are "special variables like
=ExitCode
Why, for examplegetenv()
does not show them (getenv("=ExitCode")
returns NULL) - Can anybody provide pointers to documentation/specifications of this stuff.