BEA Logo BEA Tuxedo Release 8.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Tuxedo Documentation   |   C Function Reference   |   Local Topics   |   Previous Topic   |   Next Topic   |   Contents

 


tuxgetenv(3c)

Name

tuxgetenv()—Returns value for environment name.

Synopsis

#include <atmi.h>  
char *tuxgetenv(char *name)

Description

tuxgetenv() searches the environment list for a string of the form name=value and, if the string is present, returns a pointer to the value in the current environment. Otherwise, it returns a NULL pointer.

This function provides a portable interface to environment variables across the different platforms on which the BEA Tuxedo ATMI system is supported, including those platforms that do not normally have environment variables.

Note that tuxgetenv is case-sensitive.

A thread in a multithreaded application may issue a call to tuxgetenv() while running in any context state, including TPINVALIDCONTEXT.

Return Values

If a pointer to the string exists, tuxgetenv() returns that pointer. If a pointer does not exist, tuxgetenv() returns a NULL pointer.

Portability

On MS Windows, this function overcomes the inability to share environment variables between an application and a Dynamic Link Library. The BEA Tuxedo ATMI Workstation DLL maintains an environment copy for each application that is attached to it. This associated environment and context information is destroyed when tpterm() is called from a Windows application. The value of an environment variable could be changed after the application program calls tpterm().

It is recommended that uppercase variable names be used for the DOS, Windows, OS/2, and NetWare environments. (tuxreadenv() converts all environment variable names to uppercase.)

See Also

tuxputenv(3c), tuxreadenv(3c)

 

back to top previous page next page