Platform SDK: Exchange Server

Using the Configuration Functions

Special configuration functions are used to pack and unpack extension data. The HrCfgPackData function packs extension data (converts an array of SPropValue structures into a binary stream) before you write it to the directory. The HrCfgUnpackData function unpacks this data after you read it from the directory. For more information, see the EDKCFG.H file.

Configuration Functions

Function Purpose
HrCfgCreateAdviseObj Begins monitoring a MAPI session for changes to extension data. Should be called once to create an advise object to register for notifications for the MAPI session to be monitored. Then, HrCfgAdvise should be called once for each extension data section (each of the values in a multivalued extension data property) being monitored. If nPollInterval == 0, no monitoring thread is created, and the user must do polling manually by calling HrCfgPollAdviseObj.
HrCfgPollAdviseObj Checks an advise object against what is stored in the directory. Calls the notification routines if there are any changes.
HrCfgDestroyAdviseObj Ends monitoring of a MAPI session. Calls HrCfgUnadvise for any extension data sections that are actively being monitored.
HrCfgAdvise Begins monitoring of an extension data section. When the extension data changes, the specified callback routine is called. The callback routine will be called once from HrCfgAdvise to set the initial extension data values.
HrCfgUnadvise Ends monitoring of an extension data section.
HrCfgPackData Takes a configuration name and a set of MAPI properties and packs them into a binary buffer suitable to be saved in the directory information tree for the gateway or other object.
HrCfgUnpackData Takes a packed binary buffer and unpacks it to yield a configuration name, number of properties, and an array of MAPI properties.
HrOpenSiteContainer Takes a pointer to a MAPI session and returns an IMAPIProp interface for the current site object.
HrOpenSiteContainerAddressing Takes a pointer to a MAPI session and returns an IMAPIProp interface for the current site addressing object.
HrOpenSessionObject Takes a pointer to a MAPI session and returns an IMAPIProp interface on the directory object associated with the session.
HrCfgPropertyTagFromNameId Takes a pointer to an IMAPIProp interface and a name identifier, and returns the MAPI property tag that represents the given name identifier for that interface.