Before you can access an address book provider, you must initialize the address book provider, and MAPI must log on to the address book provider. For more information, see Initializing an Address Book Provider.
After you have initialized an address book provider, you can access the resources in the address book provider. The IABLogon::OpenEntry function opens containers, messaging users, or distribution lists. The IABLogon::Advise function registers to receive notifications when there is a change in the address book provider.
In this topic, these functions are demonstrated by using code examples from the Sample Address Book Provider. The Sample Address Book Provider implements the required features of an address book provider, as well as more advanced features such as name resolution. For more information about the required features of an address book provider, see Required Features for Address Book Providers. For more information about downloading and installing the Sample Address Book Provider, see Installing the Sample Address Book Provider.
In addition to accessing the address book provider resources, you can access the address book container and implement more advanced features such as name resolution. For more information, see Using an Address Book Container.
When you are finished using an address book provider, you must implement functions to properly log off and shut down the address book provider. For more information, see Shutting Down an Address Book Provider.
Open Entry Routine
The IABLogon::OpenEntry function opens a container, messaging user, or distribution list. A pointer to the type of the opened object is returned in the lpulObjType parameter. A pointer to the opened object is returned in the lppUnk parameter.
The IABLogon::Advise function registers to be notified when there is a change in the address book provider's container. Notifications can be registered on messaging users, distribution lists, or containers. The ulEventMask parameter contains a mask of values that indicate which events the address book provider is interested in. For more information, see NOTIFICATION.