Skip to content

Latest commit

 

History

History
89 lines (68 loc) · 3.2 KB

nf-shlwapi-pathfindonpathw.md

File metadata and controls

89 lines (68 loc) · 3.2 KB
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)
PathFindOnPath
PathFindOnPath function [Windows Shell]
PathFindOnPathW
_win32_PathFindOnPath
shell.PathFindOnPath
shlwapi/PathFindOnPath
shlwapi/PathFindOnPathW
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
PathFindOnPathW
shlwapi/PathFindOnPathW
c++
APIRef
kbSyntax
DllExport
Shlwapi.dll
API-MS-Win-shlwapi-IE-l1-1-0.dll
API-MS-Win-shlwapi-Winrt-storage-l1-1-0.dll
api-ms-win-shlwapi-winrt-storage-l1-1-1.dll
PathFindOnPath
PathFindOnPathA
PathFindOnPathW

PathFindOnPathW function

-description

Searches for a file.

-parameters

-param pszPath [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.

-param ppszOtherDirs [in, optional]

Type: LPCTSTR*

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

-returns

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.

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.