Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> wsenvvariableget() / wsenvvariableset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 WSEnvVariableGet() / WSEnvVariableSet()
------------------------------------------------------------------------------
 Warning:
 USE WITH EXTREME CAUTION.

 If lpszNewValue is used to change an environment variable, do not change
 the PATH variable without calling SchVectorPathSet() afterwards to realign
 the search drive vector.

 Purpose:
 Get or set an environment variable.

 Syntax:
 lpszValue=WSEnvVariableGet( lpszVarName )
 lpszValue=WSEnvVariableSet(lpszVarName,lpszNewValue)

 Parameters:
 lpszVarName  The environment variable name.
 lpszNewValue The new value for the environment variable.

 Returns:
 A character string of length 255.

 The CA-Clipper names for these functions are:
 WSEnvVarGet() / WSEnvVarSet()

 Description:
 WSEnvVariableGet() returns the value of the DOS environment variable
 lpszVarName. If lpszVarName does not appear in the environment settings,
 an empty string is returned.

 WSEnvVariableSet() sets the specified DOS environment variable lpszVarName
 to the value lpszNewValue and returns the previous value.

 Example:
 // To change the value of the DOS environment variable COMSPEC
 t// o C:\DOS\COMMAND.COM.
 lpszOldVar = WSEnvVariableSet("COMSPEC", "C:\DOS\COMMAND.COM")
 lpszNewVar = WSEnvVariableGet("COMSPEC")
 if ( !empty( lpszNewVar ) )
    "Environment variable COMSPEC is now set to", lpszNewVar
 endif

See Also: WSEnvSizeGet() WSEnvFreeGet()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson