GetMatchingEntry
The GetMatchingEntry function takes a given string and searches the name properties of all address cards in the Contacts database for a name that matches the string.
Syntax
BOOL GetMatchingEntry(TCHAR *szMatch, int *pBufSize, TCHAR *szField, PEGOID *poidMatch, HHPRTAG *phhMatch);
At a Glance
Header file: |
Addrstor.h |
Platforms: |
H/PC |
Versions: |
1.0 and later |
Parameters
- szMatch
- Pointer to a buffer that contains the string to match. If GetMatchingEntry found multiple matches, it copies the string that the user chose to the buffer.
- pBufSize
- Address of a variable that contains the length of the string pointed to by the szMatch parameter.
- szField
- Pointer to a buffer that contains the long name of the property to search for. For example, the buffer would contain "Internet" to retrieve an e-mail address. You can retrieve the long name by using the GetPropertyDataStruct function.
- *poidMatch
- Upon successful return of GetMatchingEntry, this parameter points to the object identifier of the address card containing the search string.
- *phhMatch
- Upon successful return of GetMatchingEntry, this parameter points to the property of the address card containing the search string.
Return Values
Returns TRUE if successful or FALSE otherwise.
Remarks
The GetMatchingEntry function can be used to search name properties that partially match the search string. For example, if the given string were "Jo Do", matching name properties would include "John Doe" and "Joan Donut". If the function finds more than one match, it displays a dialog box that lets the user choose one of the records.
See Also
GetPropertyDataStruct, PropertyDataStruct