UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:shlwapi.PathFindOnPathW |
PathFindOnPathW function (shlwapi.h) |
Searches for a file. (Unicode) |
|
shell\PathFindOnPath.htm |
shell |
d9281eb2-39b7-444f-85b7-1e1e76c38ae2 |
12/05/2018 |
PathFindOnPath, PathFindOnPath function [Windows Shell], PathFindOnPathA, PathFindOnPathW, _win32_PathFindOnPath, shell.PathFindOnPath, shlwapi/PathFindOnPath, shlwapi/PathFindOnPathA, shlwapi/PathFindOnPathW |
shlwapi.h |
Windows |
Windows 2000 Professional, Windows XP [desktop apps only] |
Windows 2000 Server [desktop apps only] |
PathFindOnPathW (Unicode) and PathFindOnPathA (ANSI) |
Shlwapi.lib |
Shlwapi.dll (version 4.71 or later) |
Windows |
19H1 |
|
|
|
|
|
|
Searches for a file.
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.
Type: LPCTSTR*
An optional, null-terminated array of directories to be searched first. This value can be NULL.
Type: BOOL
Returns TRUE if successful, or FALSE otherwise.
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.
Note
The shlwapi.h header defines PathFindOnPath as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.