_NutWIN32putenv()

update Win32 environment 

Function


SYNOPSIS

#include <nutc.h>

int _NutWIN32putenv(const char *name, const char *value);


DESCRIPTION

The NuTCRACKER Platform maintains two distinct environments: the UNIX version, where the keys are case sensitive, and the Win32 version, which is a pass-through to the Win32 functions GetEnvironmentVariable() and SetEnvironmentVariable().

The function _NutWIN32putenv() updates the Win32 environment. The value of name should be a pointer to the name of an environment variable, while value should point to its new value. _NutWIN32putenv() either adds or updates the named environment variable. If value is NULL, then name is deleted from the Win32 environment of the process.


PARAMETERS

name 

Points to the name of the Win32 environment variable.

value 

Points to the new value of the Win32 environment variable.


RETURN VALUES

If successful, _NutWIN32putenv() returns 1. Otherwise, it returns 0, and sets errno as follows:

EINVAL 

name is not a variable in the environment.


CONFORMANCE

PTC MKS Toolkit UNIX APIs extension.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

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


SEE ALSO

Functions:
_NutWIN32getenv(), getenv()

Miscellaneous:
environ


PTC MKS Toolkit 10.4 Documentation Build 39.