EnumProjectsFiles

Send Feedback

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

Note   This function is deprecated. Use EnumProjectsFilesEx instead.

Syntax

int EnumProjectsFiles(
  PROJECTSFILES_ENUMPROC lpEnumProc, 
  DWORD dwOidFlash, 
  DWORD dwFlags, 
  LPTSTR lpszProj, 
  LPTSTR lpszFileName, 
  LPARAM lParam 
);

Parameters

  • lpEnumProc
    [in] Long pointer to a callback function of the following prototype:

    BOOL CALLBACK EnumProjects(DWORD dwOid**, LPARAM** lParam**);**

    If this pointer is set to NULL, EnumProjectsFiles returns only the number of files.

  • dwOidFlash
    [in] Specifies the object identifier of the specified mountable file system.

  • dwFlags
    [in] Specifies the valid flags. It is one or a combination of the values described in the following table.

    Flag Value Description
    PRJ_ENUM_MEMORY 0x1 Enumerate files in main memory only. The dwOidFlash parameter is ignored.
    PRJ_ENUM_FLASH 0x2 Enumerate 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 Enumerate files in main memory and flash cards. The dwOidFlash parameter is ignored.
    PRJ_ENUM_ALL_PROJ 0x10 Enumerate all files. The lpszProj 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 values should not be used together.

  • lpszProj
    [in] Long pointer to the null-terminated string that contains the file name to search for. 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.

  • lpszFileName
    [in] Long 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 passed to lpEnumProc. Use this parameter to pass information to the callback function.

Return Values

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

Remarks

This function is provided for backward compatibility. EnumProjectsFiles will skip over any file that is not on an object identifier (OID-based) file system, enumerating everything in main memory while ignoring storage cards. Instead, use EnumProjectsFilesEx, which corrects those deficiencies.

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

To enumerate the files on a flash card, first call FindFirstFlashCard and FindNextFlashCard to locate the OID of the flash card. Enumerate folders using EnumProjects.

Requirements

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

See Also

EnumProjects | EnumProjectsFilesEx | File and Application Management Functions | FindFirstFlashCard | FindNextFlashCard

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.