Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FindFirstFileEx

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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 
);

lpFileName

[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 (?).

fInfoLevelId

[in] FINDEX_INFO_LEVELS enumeration type that specifies the information level of the returned data.

lpFindFileData

[out] Pointer to a WIN32_FIND_DATA structure.

fSearchOp

[in] FINDEX_SEARCH_OPS enumeration type that specifies the type of filtering to perform beyond wildcard matching.

lpSearchFilter

[in] Pointer that must be set to NULL.

dwAdditionalFlags

[in] Unsupported. Set to zero.

A search handle that can be used in a subsequent call to the FindNextFile or the FindClose functions indicates success. INVALID_HANDLE_VALUE indicates failure. To get extended error information, call GetLastError.

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);

Headerwinbase.h
Librarycoredll.lib
Windows Embedded CEWindows CE 3.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2014 Microsoft