EnumProjectsFilesEx

Send Feedback

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

Note   For Pocket PCs, this function supersedes EnumProjectsFiles.

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 FindFirstFlashCard or FindNextFlashCard. Used only when dwFlags equals 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 object identifier of the flash card returned from a previous call to FindFirstFlashCard or FindNextFlashCard.
    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 flags should not be 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 under 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 for — for example, *.* or mysound.wav.

  • lParam
    [in] Caller-defined parameter that is passed to the callback function specified by pfnEnumProc.

Return Values

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

Remarks

To enumerate the files on a flash card, first call FindFirstFlashCard and FindNextFlashCard to locate the object identifier (OID) of the flash card. Enumerate folders using EnumProjectsEx.

Requirements

Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: projects.h
Library: note_prj.lib

See Also

EnumProjectsEx | EnumProjectsFilesExCallback | File and Application Management Functions | FindFirstFlashCard | FindNextFlashCard

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.