Compartilhar via


CeFindAllFiles (RAPI) (Windows CE 5.0)

Send Feedback

This function retrieves information about all files and directories in the given directory of the Windows CE object store. The function copies information to an array of CE_FIND_DATA structures.

CeFindAllFiles is a remote application programming interface (RAPI), which enables an application running on a desktop computer to make function calls on a Windows CE–based device.

BOOLCeFindAllFiles(LPCWSTRszPath, DWORDdwFlags, LPDWORDlpdwFoundCount, LPLPCE_FIND_DATAppFindDataArray);

Parameters

  • szPath
    [in] Null-terminated string contains the name of the path in which to search for files. Note that within the path string, two backslashes (\\) must be used to achieve a single backslash because the C language reserves a single backslash for escape characters. For example, a valid path would be \\temp, whereas a path set to \temp would expand to the tab character followed by emp.

  • dwFlags
    [in] Combination of filter and retrieval flags. The filter flags specify what kinds of files to document, and the retrieval flags specify which members of the CE_FIND_DATA structure to retrieve.

    The filter flags can be a combination of the following values.

    Value Description
    FAF_ATTRIB_CHILDREN Only retrieve information for directories which have child items.
    FAF_ATTRIB_NO_HIDDEN Do not retrieve information for files or directories which have the hidden attribute set.
    FAF_FOLDERS_ONLY Only retrieve information for directories.
    FAF_NO_HIDDEN_SYS_ROMMODULES Do not retrieve information for ROM files or directories.

    The retrieval flags can be a combination of the following values.

    Value Description
    FAF_ATTRIBUTES Retrieve the file attributes and copy them to the dwFileAttributes member.
    FAF_CREATION_TIME Retrieve the file creation time and copy it to the ftCreationTime member.
    FAF_LASTACCESS_TIME Retrieve the time when the file was last accessed and copy it to the ftLastAccessTime member.
    FAF_LASTWRITE_TIME Retrieve the time when the file was last written to and copy it to the ftLastWriteTime member.
    FAF_SIZE_HIGH Retrieve the high-order DWORD value of the file size and copy it to the nFileSizeHigh member.
    FAF_SIZE_LOW Retrieve the low-order DWORD value of the file size and copy it to the nFileSizeLow member.
    FAF_OID Retrieve the object identifier of the file and copy it to the dwOID member.
    FAF_NAME Retrieve the file name and copy it to the cFileName member.
  • lpdwFoundCount
    [out] Long pointer to a variable that receives a count of the items found.

  • ppFindDataArray
    [out] Pointer to the pointer to an array of CE_FIND_DATA structures that receive information about the found items. It is the application's responsibility to free the memory used by the array. To free the memory you must call CeRapiFreeBuffer.

Return Values

TRUE indicates success. FALSE indicates failure. To determine if a function failed because of RAPI errors, call CeRapiGetError. To determine if a function failed because of non-RAPI errors, call CeGetLastError.

Remarks

When writing applications for Windows CE 1.0 and 1.01, use the PegFindAllFiles function.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Rapi.h.
Link Library: Rapi.lib.

See Also

RAPI Functions | CeRapiGetError | CeGetLastError | CeRapiFreeBuffer | CE_FIND_DATA

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.