PathFindOnPathA function

Searches for a file.

Syntax

BOOL PathFindOnPathA(
  LPSTR   pszPath,
  PZPCSTR ppszOtherDirs
);

Parameters

pszPath

Type: LPTSTR

A pointer to a null-terminated string of length MAX_PATH that contains the file name for which to search. If the search is successful, this parameter is used to return the fully qualified path name.

ppszOtherDirs

Type: LPCTSTR*

An optional, null-terminated array of directories to be searched first. This value can be NULL.

Return Value

Type: BOOL

Returns TRUE if successful, or FALSE otherwise.

Remarks

PathFindOnPath searches for the file specified by pszFile. If no directories are specified in ppszOtherDirs, it attempts to find the file by searching standard directories such as System32 and the directories specified in the PATH environment variable. To expedite the process or enable PathFindOnPath to search a wider range of directories, use the ppszOtherDirs parameter to specify one or more directories to be searched first. If more than one file has the name specified by pszFile, PathFindOnPath returns the first instance it finds.

Requirements

   
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shlwapi.h
Library Shlwapi.lib
DLL Shlwapi.dll (version 4.71 or later)