This function searches a directory for a file with the specified name and attributes.
HANDLE FindFirstFileEx( LPCTSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags );
[in] Pointer to a null-terminated string that specifies a valid directory or path and file name, which can contain wildcard characters such as an asterisk (*) or a question mark (?).
[in] FINDEX_INFO_LEVELS enumeration type that specifies the information level of the returned data.
[out] Pointer to a WIN32_FIND_DATA structure.
[in] FINDEX_SEARCH_OPS enumeration type that specifies the type of filtering to perform beyond wildcard matching.
[in] Pointer that must be set to NULL.
[in] Unsupported. Set to zero.
This function opens a search handle to obtain information about the first file with the specified name and attributes. File name searches are not case-sensitive.
If the underlying file system does not support the specified type of filtering other than directory filtering, this function fails and returns ERROR_NOT_SUPPORTED. The application must use the FileExSearchNameMatch type in the FINDEX_SEARCH_OPS structure and perform its own filtering.
Once established, the search handle can be used in FindNextFile to search for other files that match the same name and attributes with the same filtering being performed. When the search handle is no longer needed, close it by using the FindClose function.
The following calls to this function and FindFirstFile are equivalent.
FindFirstFileEx(lpFileName, FindExInfoStandard, lpFindData, FindExSearchNameMatch, NULL, 0); FindFirstFile(lpFileName, lpFindData);