Click to Rate and Give Feedback

  Switch on low bandwidth view
FindFirstFile
Windows Mobile SupportedWindows Embedded CE Supported
8/28/2008

This function searches a directory for a file or subdirectory with the specified file name.

A RAPI version of this function exists called CeFindFirstFile (RAPI).


HANDLE FindFirstFile(
  LPCTSTR lpFileName, 
  LPWIN32_FIND_DATA lpFindFileData 
); 
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 (?).

The default string size limit for paths is MAX_PATH characters. This limit is related to how this function parses paths.

lpFindFileData

[out] Pointer to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory.

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

This function opens a search handle and returns information about the first file with the specified name. Once the search handle is established, use this function to search for other files that match the pattern. When the search handle is no longer needed, close it with FindClose.

This function searches for files by name only. It cannot be used for attribute-based searches.

Headerwinbase.h
Librarycoredll.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker