EnumProjectsFilesEx

4/8/2010

This function enumerates files in a folder or all folders in main memory or on a mountable file system, such as a flash card.

Syntax

int EnumProjectsFilesEx (
  PROJECTSFILES_ENUMPROC_EX pfnEnumProc, 
    DWORD dwOidFlash, 
  DWORD dwFlags, 
  LPTSTR szProj, 
  LPTSTR szFileName, 
  LPARAM lParam 
);

Parameters

  • pfnEnumProc
    [in] Pointer to the EnumProjectsFilesExCallback callback function. If this pointer is set to NULL, EnumProjectsFilesEx returns only the number of files.
  • dwOidFlash
    [in] Specifies the object identifier (OID) of the flash card to enumerate, which is the value returned by the FindFirstFlashCard or the FindNextFlashCard function. Used only when the dwFlags parameter is set to PRJ_ENUM_FLASH.
  • dwFlags
    [in] Specifies the valid flags. It is one or a combination of the values described in the following table, specifying which location to check and which projects to check.

    Flag Value Description

    PRJ_ENUM_MEMORY

    0x1

    Check files in main memory only. The dwOidFlash parameter is ignored.

    PRJ_ENUM_FLASH

    0x2

    Check files on the specified flash card only. The dwOidFlash parameter is the OID of the flash card returned from a previous call to the FindFirstFlashCard or the FindNextFlashCard function.

    PRJ_ENUM_ALL_DEVICES

    0x4

    Check files in main memory and on every flash card. The dwOidFlash parameter is ignored.

    PRJ_ENUM_ALL_PROJ

    0x10

    Enumerate in all projects. The szProj parameter is ignored.

    PRJ_ENUM_HOME_PROJ

    0x100

    Include the My Documents folder in the file enumeration.

    PRJ_ENUM_FLASH and PRJ_ENUM_ALL_DEVICES are not used together.

  • szProj
    [in] Pointer to the null-terminated string that specifies the project to search within. If this parameter is set to NULL, the function enumerates all files in the My Documents folder. Used only when dwFlags is not set to PRJ_ENUM_ALL_PROJ.
  • szFileName
    [in] Pointer to the null-terminated string that contains the name or type of file to search fo, for example, *.* or mysound.wav.
  • lParam
    [in] Caller-defined parameter that is passed to the callback function specified by pfnEnumProc.

Return Value

The number of files enumerated indicates success. If there are no files to enumerate, this function returns zero. If pfnEnumProc is set to NULL, this function still returns the number of folders.

Remarks

To enumerate the files on a flash card, first call the FindFirstFlashCard and the FindNextFlashCard functions to obtain the OID of the flash card. Enumerate folders with the EnumProjectsEx function.

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
EnumProjectsEx
EnumProjectsFilesExCallback
FindFirstFlashCard
FindNextFlashCard