CeFindNextDatabaseEx (EDB) (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

CEOID CeFindNextDatabaseEx(
  HANDLE hEnum,
  PCEGUID pGuid
);

Parameters

  • hEnum
    [in] Handle to the enumeration context created by calling the CeFindFirstDatabaseEx function.
  • pGuid
    [out] On successful return, contains the GUID for the volume in which the found database resides. This parameter can be set to NULL.

Return Value

A valid CEOID indicates success. Zero indicates failure or a lack of additional databases. To get extended error information, call GetLastError. The following table shows possible values.

Return Value Description

ERROR_INVALID_HANDLE

The hEnumparameter is set to NULL or equal to INVALID_HANDLE_VALUE.

ERROR_KEY_DELETED

A database was deleted during enumeration.

ERROR_NO_MORE_ITEMS

There are no more items to enumerate.

Remarks

If there are no remaining databases left to enumerate, this function returns zero, 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 zero, and GetLastError returns ERROR_KEY_DELETED. If this error occurs, restart the enumeration with a call to CeFindFirstDatabaseEx.

When enumeration is complete, the hEnum handle must be closed by calling the CloseHandle function.

The following are 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 needs only the handle to identify the enumeration context.

Requirements

Header windbase.h
Library coredll.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

EDB Functions
CeFindFirstDatabaseEx (EDB)