Looks up environment variables for the current process, and bridges the standard API getenv.
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. |
Integer.
Returns 1 for success, and 0 for failure.
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. |
![]() |