INtime SDK Help
PutRtEnvironmentVariable
INtime SDK v7 > About INtime > INtime Kernel > Environment variables > PutRtEnvironmentVariable

Sets an environment variable to the given value.

BOOLEAN 
RTAPI 
PutRtEnvironmentVariable(
    LPCSTR szName, 
    LPCSTR szValue, 
    BOOLEAN bOverwrite);

Parameters

szName
A pointer to the name of the environment variable to set.
szValue
A pointer to the value of the environment variable.
bOverwrite
If non-zero then overwrite the value of the variable if it already exists.

Remarks

Environment variable names are case-sensitive.

Neither name nor value may contain the character '='. 

Return values

Returns TRUE on success. Returns FALSE on failure. Call GetLastRtError() to find the failure status. Possible status values include:
E_CONTEXT
Name is null or zero length or contains '=' or value is null.
E_EXIST
The variable exists and bOverwrite is FALSE.
E_BAD_ADDR
One or other of the szValue or pdwValueLen pointers is invalid.

Requirements

Versions Defined in Include Link to
INtime 6.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also