|
|
От: |
VVV
|
|
| Дата: | 23.09.04 18:29 | ||
| Оценка: | |||
To use a particular template for adding a new entry to a modifiable container
Call IMAPISession::OpenEntry to open the destination container, setting the lpEntryID parameter to the entry identifier of the container.
Call the destination container's IMAPIProp::OpenProperty method and set ulPropTag to PR_CREATE_TEMPLATES and lpiid to IID_IMAPITable. The container will return a one-off table listing all of the templates that it supports for creating new entries.
Retrieve the row that represents the template for the particular type of entry you want to create. The PR_ADDRTYPE column indicates the address type that is supported by the template.
Call IAddrBook::NewEntry and set lpEIDNewEntryTpl to the entry identifier of the selected template. This will be the PR_ENTRYID column from the template's row in the one-off table. Pass zero in cbEIDContainer and NULL in lpEIDContainer. Pass a valid pointer in the lppEIDNewEntry parameter if you want to retain the new entry's entry identifier.