Platform SDK: Exchange Server

Extension Interfaces

To implement any of the extension types supported by Microsoft Exchange, you create a single dynamic link library (DLL) that contains one or more extension object. An extension object complies with the Microsoft Windows Component Object Model and implements a set of Microsoft Exchange extensibility interfaces. Each extension type has more than one interface associated with it, but some of these interfaces are optional.

If you implement an interface, you must implement all of its methods, even if your extension does not use them. For those methods that your extension doesn’t use, a default response can usually be implemented with little effort. All extension objects must implement the IExchExt : IUnknown interface.

The interaction between Microsoft Exchange and an extension object is bidirectional and involves more than simply calling an extension object’s methods. To operate correctly, extension objects must gather information about the version of Microsoft Exchange, the MAPI session, and menu, toolbar and window handles. In most cases, they must also retrieve information from Microsoft Exchange about which objects, such as messages and folders, are currently selected within Microsoft Exchange windows. Retrieving this information is achieved with the IExchExtCallback : IUnknown interface, which is passed to many extension object methods.

The following are the four types of extensions and the corresponding interfaces:

Extension type Interfaces to implement
Command extensions IExchExt (required).

IExchExtCommands (required).

IExchExtUserEvents (optional). Implement if you want to handle changes to the currently-selected list box item, text, or object.

Event extensions IExchExt (required).

IExchExtSessionEvents (optional). Implement if you want to customize the behavior when new messages are delivered.

IExchExtUserEvents (optional). Implement if you want to handle changes to the currently-selected list box item, text, or object.

IExchExtMessageEvents (optional). Implement if you want to customize the way Microsoft Exchange manipulates messages.

IExchExtAttachedFileEvents (optional). Implement if you want to customize the handling of message file attachments.

Property sheet extensions IExchExt (required).

IExchExtPropertySheets (required).

Advanced criteria extensions IExchExt (required).

IExchExtAdvancedCriteria (required).