Function

ABCopyArrayOfMatchingRecords

Returns an array of records that match the given search element, or an empty array if no records match the search element.

Declaration

CFArrayRef ABCopyArrayOfMatchingRecords(ABAddressBookRef addressBook, ABSearchElementRef search);

Parameters

addressBook

The address book for the logged-in user.

search

The search element that specifies the query. If search is NULL, this function raises an exception. Create an ABSearchElement object using the record specific functions: ABGroupCreateSearchElement or ABPersonCreateSearchElement. See ABSearchElement C for more functions that create compound queries.

Return Value

A new array containing ABRecord objects representing all the records that match search. If no records match search, this function returns an empty array. You are responsible for releasing this object.

See Also

Search Elements

ABSearchElementCreateWithConjunction

Returns a compound search element created by combining the search elements in an array with the given conjunction.

ABSearchElementMatchesRecord

Tests whether or not a record matches a search element.