abRead

This function reads fields of the current record.

Syntax

HRESULT abRead ( CEOID ceoid, LPWORD lpwNumProp, CEPROPID *rgPropID, PCEPROPVAL *prgCEPropVal );

Parameters

ceoid
[in] Object identifier of the record or NULL for current record.
lpwNumProp
[in/out] Long pointer to the number of fields requested.
rgPropID
[in] Array of HHPR_* property identifiers that indicate the fields to read.

The following database fields are used by the Auto PC:
HHPR_ANNIVERSARY
HHPR_ASSISTANT_NAME
HHPR_ASSISTANT_TELEPHONE_NUMBER
HHPR_BIRTHDAY
HHPR_BUSINESS_FAX_NUMBER
HHPR_CAR_TELEPHONE_NUMBER
HHPR_CATEGORY
HHPR_CHILDREN_NAME
HHPR_COMPANY_NAME
HHPR_DEPARTMENT_NAME
HHPR_EMAIL1_EMAIL_ADDRESS
HHPR_EMAIL2_EMAIL_ADDRESS
HHPR_EMAIL3_EMAIL_ADDRESS
HHPR_GIVEN_NAME
HHPR_HOME_ADDRESS_CITY
HHPR_HOME_ADDRESS_COUNTRY
HHPR_HOME_ADDRESS_POSTAL_CODE
HHPR_HOME_ADDRESS_STATE
HHPR_HOME_ADDRESS_STREET
HHPR_HOME_FAX_NUMBER
HHPR_HOME_TELEPHONE_NUMBER
HHPR_HOME2_TELEPHONE_NUMBER
HHPR_MIDDLE_NAME
HHPR_MOBILE_TELEPHONE_NUMBER
HHPR_OFFICE_ADDRESS_CITY
HHPR_OFFICE_ADDRESS_COUNTRY
HHPR_OFFICE_ADDRESS_POSTAL_CODE
HHPR_OFFICE_ADDRESS_STATE
HHPR_OFFICE_ADDRESS_STREET
HHPR_OFFICE_LOCATION
HHPR_OFFICE_TELEPHONE_NUMBER
HHPR_OFFICE2_TELEPHONE_NUMBER
HHPR_PAGER_NUMBER
HHPR_SPOUSE_NAME
HHPR_SURNAME
HHPR_TITLE
HHPR_WEB_PAGE

prgCEPropVal
[out] Pointer to the PCEPROPVAL structure that receives data.

Return Values

NOERROR indicates success. S_FALSE indicates failure.

Remarks

The following code example shows how to use the Address Book API. The abRead function is used to retrieve the information from the Given Name and Surname fields of a particular record.

AbOpen(pFrmMgr);
ABDIALOGIN abDl = {
 NULL,
 0,
 NULL,
 ABV_MAINVIEW,
 0
};
abDialog(&abDl);
WORD wNumProp = 2;
CEPROPID cepi[] = {HHPR_GIVEN_NAME, HHPR_SURNAME};
PCEPROPVAL pcepv;
abRead(abDl.ceoid, &wNumProp, cepi, &pcepv);
abClose();

See Also

abClose, abOpen