CreateAddressBook
The CreateAddressBook function creates the Contacts database if it does not already exist.
Syntax
BOOL CreateAddressBook(HHPRTAG *rghhProps, int numProps);
At a Glance
Header file: |
Addrstor.h |
Platforms: |
H/PC |
Windows CE versions: |
1.0 and later |
Parameters
- rghhProps
- Pointer to an array of up to four property tags that identify properties on which the address cards can be sorted. Property tags begin with the HHPR_ prefix. For a list of these tags, see Properties and Property Tags. If this parameter is NULL, the function uses the following property tags by default:
- HHPR_SURNAME
- Sort based on surnames.
- HHPR_COMPANY_NAME
- Sort based on company names.
- HHPR_OFFICE_TELEPHONE_NUMBER
- Sort based on the office telephone numbers.
- HHPR_HOME_TELEPHONE_NUMBER
- Sort based on home telephone numbers.
- numProps
- Number of property tags in the rghhProps array. If rghhProps is NULL, this parameter is ignored.
Return Values
Returns TRUE if the Contacts database was created, or FALSE otherwise. To get extended error information, call the GetLastError function.
Remarks
Before calling the CreateAddressBook function, an application should use the OpenAddressBook function to determine whether the Contacts database already exists.