EnumProjects

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

At a Glance

Header file: Projects.h
Windows CE Versions: 2.01 and later

Syntax

int EnumProjects(PROJECT_ENUMPROC lpEnumProc,
DWORD
dwOidFlash, DWORD dwFlags, LPARAM lParam);

Parameter

lpEnumProc
Long pointer to a callback function of the following prototype:

BOOL CALLBACK EnumProjects(DWORD dwOid, LPARAM lParam);

If this pointer is set to NULL, EnumProjects only returns the number of projects.

dwOidFlash
Specifies an object identifier of the specified mountable file system.
dwFlags
Specifies the valid flags. It is one of the following values:
PRJ_ENUM_MEMORY
Enumerate folders in main memory only. The dwOidFlash parameter is ignored.
PRJ_ENUM_ALL_DEVICES
Enumerate folders in main memory and on flash cards. The dwOidFlash parameter is ignored.
PRJ_ENUM_FLASH
Enumerate flash card projects only. The dwOidFlash parameter is the object identifier of a flash card.
lParam
User-defined parameter passed to lpEnumProc. Use this parameter to pass information into the callback function.

Return Values

The number of folders enumerated indicates success. If there are no folders to enumerate, EnumProjects returns a zero. If lpEnumProc is NULL, EnumProjects still returns the number of folders

Remarks

Use the callback function to perform any operations within the enumerated folders—for example, to pass out the name of each folder, and then display all these names in a dialog box. The callback function returns FALSE to stop enumeration.

To enumerate the folders on a flash card, first call FindFirstFlashCard and FindNextFlashCard to locate the object identifier (OID) of the flash card. Once you have enumerated the folders with EnumProjects, enumerate the files with EnumProjectsFiles.

See Also

EnumProjectsFiles, FindFirstFlashCard, FindNextFlashCard