INtime SDK Help
INtime SDK v7.1 > About INtime > INtime Kernel > Files > FindFirstRtFile

Searches a directory for a file or subdirectory with a name and attributes that match those specified.

BOOLEAN FindFirstRtFile(
        LPSTR lpFileName, 
        LPFIND_FILE_DATA  lpFindData,
        DWORD dwFlags);


A string containing a filename to search for, which can include wildcards such as asterisk (‘*’) or question mark (‘?’). The name is limited to MAX_PATH characters. The string must not terminate with a directory delimiter.
A pointer to a FIND_FILE_DATA structure which receives the file data.
Reserved for future use. Must be set to zero.


The function returns information about the first file that the file system finds with a name that matches the specified pattern. This may or may not be the first file or directory that appears in a directory-listing application when given the same file name string pattern. This is because the function does no sorting of the search results.

The search is performed strictly on the name of the file, not on any attributes such as a date or a file type.

An attempt to start a search with a trailing directory delimiter (‘/’ or ‘\’) always fails.

Return codes

TRUE on success. FALSE on failure. The error status may be returned by calling GetLastRtError.


Versions Defined in Include Link to
INtime 6.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also