Group: File Management - Library: kernel32
The FindFirstFile function searches a directory for a file whose name matches the specified file name. FindFirstFile examines subdirectory names as well as file names.
Building a tree of subdirectories for a given path using FindFile functions
HANDLE FindFirstFile(
LPCTSTR lpFileName, // file name
LPWIN32_FIND_DATA lpFindFileData // data buffer
);
DECLARE INTEGER FindFirstFile IN kernel32;
STRING lpFileName,;
STRING @ lpFindFileData
lpFileName [in] Pointer to a null-terminated string that specifies a valid directory or path and file name, which can contain wildcard characters (* and ?).
lpFindFileData [out] Pointer to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory.
If the function succeeds, the return value is a search handle used in a subsequent call to FindNextFile or FindClose.