CeFindNextDatabaseEx (EDB) (Windows CE 5.0)
This function returns the OID of the next database that matches the enumeration criteria set up by calling the CeFindFirstDatabaseEx (EDB) function.
This function does not work with CEDB databases. For more information about CEDB, see CEDB Reference.
CEOID CeFindNextDatabaseEx( HANDLEhEnum,PCEGUIDpGuid);
[in] A handle to the enumeration context created by calling the CeFindFirstDatabaseEx function.
[out] On successful return, contains the GUID for the volume in which the found database resides. This parameter can be NULL.
A valid CEOID indicates success. Zero indicates failure or a lack of additional databases. To get extended error information, call GetLastError. The following table lists possible values returned by GetLastError:
|ERROR_INVALID_HANDLE||Indicates that hEnum is NULL or equal to INVALID_HANDLE_VALUE.|
|ERROR_NO_MORE_ITEMS||Indicates that there are no more items to enumerate.|
|ERROR_KEY_DELETED||Indicates that a database was deleted during enumeration.|
If there are no remaining databases left to enumerate, then this function returns 0 and GetLastError returns ERROR_NO_MORE_ITEMS.
As each volume is enumerated, this function takes a snapshot of the databases that are in the volume. As those databases are being enumerated, if one of them is deleted, this function returns 0 and GetLastError returns ERROR_KEY_DELETED. If this error occurs, you must restart the enumeration with a call to the CeFindFirstDatabaseEx function.
When enumeration is complete, the hEnum handle must be closed by calling the CloseHandle function.
The following list highlights the differences between this function and the CEDB equivalent function:
- The order of database enumeration in EDB is different from that in CEDB.
- CEDB requires the CEGUID that is passed in to be the same as that used for CeFindFirstDatabaseEx. EDB ignores this value if it is set; EDB only needs the handle to identify the enumeration context.
OS Versions: Windows CE 5.0 and later.
Link Library: Coredll.lib.
Send Feedback on this topic to the authors