[Toc][Index]

DosScanEnv


Bindings:  C, MASM 

This call scans (searches) an environment segment for an environment 
variable. 
 DosScanEnv    (EnvVarName, ResultPointer) 
 
 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. 
 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. 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs