SearchTreeForFile

The SearchTreeForFile function is used to search a tree for a specified file.

BOOL SearchTreeForFile(

IN LPSTR RootPath,  
IN LPSTR InputPathName,  
OUT LPSTR OutputPathBuffer  
);  

Parameters

RootPath

The starting path where SearchTreeForFile begins searching for InputPathName.

InputPathName

The filename that is searched for. A partial path can be included.

OutputPathBuffer

The full path to the filename that is found. This string is not modified if the return value is FALSE.

Return Values

If the function succeeds, the return value is TRUE.

If the function fails, then the return value is FALSE. To retrieve extended error information, call GetLastError.

Remarks

The filename contained in InputPathName is searched for beginning at the path specified in RootPath. The maximum path depth that is allowed in the RootPath is 32 directories. When the file is found in the directory tree, the full path to the file is placed in the OutputPathBuffer string. The order of the subdirectory search is defined by the underlying file system.