flag (ULONG) - input

      A word bit vector that controls the behavior of DosSearchPath.

      This parameter contains the following bit fields:

      Bit

        Description
      31-3
        Reserved; must be 0.
      2
        SEARCH_IGNORENETERRS (0x00000004)
        Ignore Network Errors bit. This bit controls whether the search will abort if it encounters a network error, or will continue the search with the next element. This allows you to place network paths in the PATH variable and be able to find executables in components of the PATH variable, even if the network returns an error, for example, if a server is down. If the Ignore Network Errors Bit is 0, DosSearchPath will end the search if it encounters an error from the network. If the Ignore Network Errors Bit is 1, DosSearchPath will continue the search if it encounters network errors.
      1
        SEARCH_ENVIRONMENT (0x00000002)
        Path Source bit. This bit determines how DosSearchPath interprets pszPathOrName

      • pszPathOrName points to the actual search path. The search path string may be anywhere in the calling process's address space. Therefore, it may be in the environment, but is not required.

      • pszPathOrName. points to the name of an environment variable in the process environment, and that environment variable contains the search path.
      0
        SEARCH_CUR_DIRECTORY (0x00000001)
        Implied Current bit. This bit controls whether the current directory is implicitly on the front of the search path.

      • DosSearchPath only searches the current directory if it appears in the search path.

      • DosSearchPath searches the current working directory before it searches the directories in the search path.

        For example, Implied Current bit = 0 and path = ".\;a;b" is equivalent to Implied Current bit = 1 and path = "a;b".


      [Back] [Next]