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> wsenvvarget() / wsenvvarset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 WSEnvVarGet() / WSEnvVarSet()
------------------------------------------------------------------------------
 Warning:
 USE WITH EXTREME CAUTION.

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

 Purpose:
 Get / set an environment variable.

 Syntax:
 lpszValue=WSEnvVarGet( lpszVarName )
 lpszValue=WSEnvVarSet(lpszVarName,lpszNewValue)

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

 Returns:
 A character string of length 255.

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

 WSEnvVarSet() 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 = WSEnvVarSet("COMSPEC", "C:\DOS\COMMAND.COM")
 lpszNewVar = WSEnvVarGet("COMSPEC")
 if ( !empty( lpszNewVar ) )
    "Environment variable COMSPEC is now set to", lpszNewVar
 endif

See Also: WSEnvSizGet() WSEnvFreGet()

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