TutGetenv


Name

TutGetenv — get a SmartSockets environment variable

Synopsis

T_BOOL TutGetenv(name, value_return) 
T_STR name; 
T_STR *value_return; 

Arguments

name — name of environment variable whose value is to be retrieved

value_return — pointer to location to store the environment variable assigned to name

Return Values

TRUE if if the environment was successfully retrieved, FALSE otherwise.

Diagnostics

None

Description

TutGetenv gets a value from the environment. The environment is a list of name/value pairs that is set by the operating system for each process.

On Windows, TutGetenv gets the value from the runtime associated with the SmartSockets libraries, which may be different that the runtime that the application is running in.

Caution

None

See Also

TutPutenv

Examples

This example gets the value of RTHOME from the environment:

T_STR val; 
if (!TutGetenv("RTHOME", &val)) { 
  /* error */ 
} 
else { 
  TutOut("Value of RTHOME environment variable is %s\n", val); 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com