abSeek

This function searches for a record in the Address Book database.

Syntax

HRESULT abSeek ( DWORD dwSeekType, DWORD dwValue, PCEOID pCEOid, LPDWORD lpdwIndex );

Parameters

dwSeekType
Specifies the type of seek operation to perform. It is one of the following flags:
CEDB_SEEK_CEOID
Seek until finding an object that has the object identifier specified in the dwValue parameter. This type of seek operation is very efficient.
CEDB_SEEK_VALUESMALLER
Seek until finding the largest value that is smaller than the specified value. If none of the records has a smaller value, the seek pointer is left at the end of the database and the function returns a zero. The dwValue parameter is a pointer to a CEPROPVAL structure, which contains the specified value.
CEDB_SEEK_VALUEFIRSTEQUAL
Seek until finding the first value that is equal to the specified value. If the seek operation fails, the seek pointer is left at the end of the database, and the function returns a zero. The dwValue parameter is a pointer to a CEPROPVAL structure, which contains the specified value.
CEDB_SEEK_VALUENEXTEQUAL
Starting from the current seek position, seek exactly one position forward in the sorted order and check if the next record is equal to the value specified in the dwValue parameter. If so, return the object identifier of this next record; otherwise, return a zero and leave the seek pointer at the end of the database. This operation can be used in conjunction with the CEDB_SEEK_VALUEFIRSTEQUAL operation to enumerate all records with an equal value.
CEDB_SEEK_VALUEGREATER
Seek until finding a value greater than or equal to the specified value. If all records are smaller, the seek pointer is left at the end of the database and the function returns zero. The dwValue parameter is a pointer to a CEPROPVAL structure, which contains the specified value.
CEDB_SEEK_BEGINNING
Starting from the beginning of the database, seek forward for the number of records specified in the dwValue parameter.
CEDB_SEEK_CURRENT
Seek backward or forward from the current position of the seek pointer for the number of records specified in the dwValue parameter. The function seeks forward if dwValue is a positive value, or backward if the value is negative. A forward seek operation is efficient.
CEDB_SEEK_END
Starting from the end of the database, seek backward for the number of records specified in the dwValue parameter.
dwValue
Specifies the value to use for the seek operation. The value of this parameter depends on the value of dwSeekType.
pCEOid
Pointer to a CEOID that receives the record object identifier.
lpdwIndex
Long pointer to a DWORD that receives the ordinal from the start of the database.

Return Values

NOERROR indicates success. S_FALSE indicates failure.