int putenv(const char *string);
The putenv() function looks up an environment variable
and then modifies it.
Specifically, putenv() takes a string of the form
"name=value" and it makes the value
of the environment variable name equal to value
by altering an existing variable or creating a new one.
In either case, a copy of string
becomes part of the environment, so subsequent changes to string
have no effect on the environment. The ordering of variables in
the environment after putenv() is called, is undefined.
Points to a string of the form
If successful, putenv() returns a value of zero.
On failure, it returns a value of -1 and sets errno to
one of the following values:
The parameter name is NULL or is not in the form "name=value".
There is not enough memory to
allocate name value.
The NuTCRACKER Platform copies the environment string, rather than embedding it within the
When a NuTCRACKER Platform application starts, the NuTCRACKER Platform converts all paths in the
environment from Windows format to NuTCRACKER Platform format. When
exec()ing another program, the environment is
converted back to Win32 format. When adding paths to the
environment with putenv(), you should ensure that these
paths are in NuTCRACKER Platform format, by using _NutPathToNutc()
when appropriate. If you fail to do this, the path can be misinterpreted
when the NuTCRACKER Platform tries to convert the environment back to Win32 format.
You can control which environment variables get converted and which do not
with the by setting the NUT_ENV_CONVERT or
NUT_ENV_LITERAL environment variables.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- _NutWIN32getenv(), _NutWIN32putenv(), getenv()
PTC MKS Toolkit 10.1 Documentation Build 15.