FindFirstProjectFile

4/8/2010

This function searches a directory for the specified file. It can also search subdirectories and flash cards.

Syntax

HANDLE FindFirstProjectFile(
  LPCTSTR lpFileName, 
  LPWIN32_FIND_DATA lpFindFileData, 
  DWORD dwOidFlash, 
  LPTSTR lpszProj 
);

Parameters

  • lpFileName
    [in] Long pointer to the file name to search for, for example, *.wav.
  • lpFindFileData
    [out] Long pointer to the WIN32_FIND_DATA structure that receives information about the file or subdirectory.
  • dwOidFlash
    [in] Specifies the object identifier of the specified mountable file system. The application can obtain this identifier with the FindFirstFlashCard or the FindNextFlashCard function. If the identifier is set to zero, this function searches the main memory for the first project file in the specified folder.
  • lpszProj
    [in] Long pointer to the null-terminated string that contains the name of the specified folder. This parameter defines a subfolder in the My Documents folder of the specified flash file system.

    If this parameter is set to NULL, this function searches for files in the My Documents folder.

Return Value

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

Remarks

This function opens a search handle and returns information about the first file whose name matches the specified pattern. After the search handle is established, use the FindNextProjectFile function to search for other files that match the same 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.

This function is the Windows Mobile replacement for the Windows Embedded CE function FindFirstFile.

Requirements

Header projects.h
Library note_prj.lib
Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later

See Also

Reference

File and Application Management Functions
FindFirstFlashCard
FindNextFlashCard
FindNextProjectFile