PathFindOnPath function
Searches for a file.
Syntax
BOOL PathFindOnPath( _Inout_ LPTSTR pszFile, _In_opt_ LPCTSTR *ppszOtherDirs );
Parameters
- pszFile [in, out]
-
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 [in, optional]
-
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] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
PathFindOnPathW (Unicode) and PathFindOnPathA (ANSI) |