Command Prompt for Windows




getenvironment, _wgetenvironment, _tgetenvironment

char *getenvironment(char *name);
wchar_t *_wgetenvironment(wchar_t *name);
TCHAR *_tgetenvironment(TCHAR *name);

Retrieve an environment variable from the WinOne® Command Prompt environment space.

Parameter Description
name Address of a NULL terminated character string that contains the name of the environment variable to retrieve.

Returns

The address of a NULL terminated character string, where the environment variable is stored. On error a NULL value is returned.

Comments

The environment variable is stored in a static buffer, that is over-written each time this function is called.

See Also

putenvironment