Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
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 EnumProjectsFilesExCallbackcallback function. If this pointer is set to NULL, EnumProjectsFilesExreturns 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 FindFirstFlashCardor the FindNextFlashCardfunction. Used only when the dwFlagsparameter 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 dwOidFlashparameter is ignored.

PRJ_ENUM_FLASH

0x2

Check files on the specified flash card only. The dwOidFlashparameter is the OID of the flash card returned from a previous call to the FindFirstFlashCardor the FindNextFlashCardfunction.

PRJ_ENUM_ALL_DEVICES

0x4

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

PRJ_ENUM_ALL_PROJ

0x10

Enumerate in all projects. The szProjparameter 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 dwFlagsis 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 pfnEnumProcis set to NULL, this function still returns the number of folders.

Remarks

To enumerate the files on a flash card, first call the FindFirstFlashCardand the FindNextFlashCardfunctions to obtain the OID of the flash card. Enumerate folders with the EnumProjectsExfunction.

Requirements

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

See Also