clGetDfcErrno  clInstance

Chapter 2: Bridged Functions

clGetEnv

Description

Looks up environment variables for the current process, and bridges the standard API getenv.

Syntax

int clGetEnv(string variable, string *value)

Parameter

Description

variable

Environment variable to look up. This should not be a null string.

value

Pointer to the location to put the value the environment variable is set to. This is set to a null string if the variable cannot be found.

Return value

Integer.

Returns 1 for success, and 0 for failure.

Examples

Example 11

int rv;string envar_name;
string envar_value;
envar_name = "PATH";
rv = clGetEnv(envar_name, &envar_value);
if (rv == 1)
{
	erm("PATH envar is [%s]", envar_value);
}
else
{
	erm("Unable to get PATH envar!!!");
}




Copyright © 2005. Sybase Inc. All rights reserved. clInstance

View this book as PDF