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.
A version of this page is also available for
4/8/2010

This methods retrieves information about all files and directories in the given directory of the Windows Embedded CE object store on a remote device.

Syntax

BOOL CeFindAllFiles(
  LPCWSTR 
szPath, 
  DWORD 
dwFlags, 
  LPDWORD 
lpdwFoundCount, 
  LPLPCE_FIND_DATA 
ppFindDataArray 
);

Parameters

szPath

[in] Null-terminated string containing 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. Filter flags specify what kinds of files to search for and retrieval flags specify which members of the CE_FIND_DATAstructure to populate for each found file.

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

Value Description

FAF_ATTRIB_CHILDREN

Only retrieve information for directories that have child items.

FAF_ATTRIB_NO_HIDDEN

Do not retrieve information for files or directories that 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.

FAF_GETTARGET

Get shortcut target information.

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

Value Description

FAF_ATTRIBUTES

Retrieve the file attributes and copy them to the dwFileAttributesmember.

FAF_CREATION_TIME

Retrieve the file creation time and copy it to the ftCreationTimemember.

FAF_LASTACCESS_TIME

Retrieve the time when the file was last accessed and copy it to the ftLastAccessTimemember.

FAF_LASTWRITE_TIME

Retrieve the time when the file was last written to and copy it to the ftLastWriteTimemember.

FAF_SIZE_HIGH

Retrieve the high-order DWORDvalue of the file size and copy it to the nFileSizeHighmember.

FAF_SIZE_LOW

Retrieve the low-order DWORDvalue of the file size and copy it to the nFileSizeLowmember.

FAF_OID

Retrieve the object identifier of the file and copy it to the dwOIDmember.

FAF_NAME

Retrieve the file name and copy it to the cFileNamemember.

FAF_FLAG_COUNT

Count of flags. For internal use only.

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_DATAstructures 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 IRAPISession::CeRapiFreeBuffer.

Return Value

Nonzero indicates success. Zero indicates failure. To get extended error information, call IRAPISession::CeGetLastErrorand IRAPISession::CeRapiGetError.

Requirements

Header rapi2.h
Library ole32.lib, rapiuuid.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also