Difference between revisions of "DosScanEnv"
From EDM2
(→Remarks) |
|||
Line 34: | Line 34: | ||
As noted above, ResultPointer points to the first character of the value of the environment variable. | As noted above, ResultPointer points to the first character of the value of the environment variable. | ||
− | [[ | + | [[Category:The OS/2 API Project]] |
Revision as of 13:05, 9 June 2016
Contents
Description
This call scans (searches) an environment segment for an environment variable.
Syntax
DosScanEnv (EnvVarName, ResultPointer)
Parameters
- EnvVarName (PSZ) - input
- Address of the name of the environment variable. Do not include a trailing " = ", since this is not part of the name.
- ResultPointer (PSZ FAR *) - output
- Address where the system returns the pointer to the environment string. ResultPointer points to the first character of the string that is the value of the environment variable and can be passed directly into DosSearchPath.
Return
rc (USHORT) - return
Return code descriptions are:
- 0 NO_ERROR
- 203 ERROR_ENVVAR_NOT_FOUND
Remarks
Assume that the process' environment contains:
"DPATH=c:\sysdir;c:\libdir" | ³ ³ À---- ResultPointer points here after the following call to DosScanEnv: DosScanEnv("DPATH", &ResultPointer);
As noted above, ResultPointer points to the first character of the value of the environment variable.