Possible duplicate:
What are these weird environment variables?
I try to use the Win32API GetEnvironmentStrings function to get environment variables and I get very strange key = value pairs (an example is attached to []):
[=::=::\] [=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, this does not seem to be the correct value for the string environment, 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 type variables
=ExitCode Why, for example, getenv() does not show them ( getenv("=ExitCode") returns NULL) - Can anyone provide pointers to the documentation / specifications of this material.
c winapi environment-variables
Artyom
source share