IExchExt::Install

Enables an extension object to determine the context into which it is being loaded, along with information about that context. The MAPI and user interface information that can be retrieved by the extension includes session, store, viewer, note form, and address book information.

Quick Info

See IExchExt : IUnknown.

HRESULT Install(
  LPEXCHEXTCALLBACK lpeecb,   
  ULONG eecontext,            
  ULONG ulFlags               
);
 

Parameters

lpeecb
[in] Pointer to an IExchExtCallback interface.
eecontext
[in] Indicates the currently active Microsoft Exchange context. This parameter can have the following values:
EECONTEXT_TASK
The context where the Microsoft Exchange client application has started but has not yet logged in. This context begins when the Microsoft Exchange application starts, and ends when the Microsoft Exchange application exits. This context does not correspond to a window. This is the first context in which extensions are loaded.
EECONTEXT_SESSION
The duration of a Microsoft Exchange session. This context and EECONTEXT_TASK are the only contexts that do not correspond to a specific window.
EECONTEXT_VIEWER
The main Viewer window that displays the folder hierarchy in the left pane and folder contents in the right pane.
EECONTEXT_REMOTEVIEWER
The remote Viewer window that is displayed when the user chooses the Remote Mail command from the Tools menu in the Microsoft Exchange client.
EECONTEXT_SEARCHVIEWER
The search Viewer window that is displayed when the user chooses the Find button from the Tools menu in the Microsoft Exchange client.
EECONTEXT_ADDRBOOK
The Address Book dialog box that is displayed when the user chooses the Address Book button from the Tools menu in the Microsoft Exchange client.
EECONTEXT_SENDNOTEMESSAGE
The standard send note window in which messages of the IPM.Note class are composed.
EECONTEXT_READNOTEMESSAGE
The standard read note window in which messages of the IPM.Note class are read after they are received.
EECONTEXT_SENDPOSTMESSAGE
The standard posting window in which new IPM.Post posting messages are composed.
EECONTEXT_READPOSTMESSAGE
The standard posting window in which existing posting messages are read.
EECONTEXT_READREPORTMESSAGE
The read report message window in which the Read, Delivery, Non-Read, and Non-Delivery report messages are read after they are received.
EECONTEXT_SENDRESENDMESSAGE
The send-resend message window that is displayed when the user chooses the Send Again button from the nondelivery report.
EECONTEXT_PROPERTYSHEETS
A property sheet window.
EECONTEXT_ADVANCEDCRITERIA
Any window in which the user specifies advanced search criteria. In Microsoft Exchange, this is a window brought up by the Find button from the Tools menu, or the dialog box brought up by the Filter button.
ulFlags
[in] Bitmask of flags. The following flag can be set:
EE_MODAL
The extension is being installed into a context where modal windows are displayed. Extensions that are loaded into modal contexts should only display modal windows.

Return Values

S_OK
The extension object elects to run in this context.
S_FALSE
The extension object does not elect to run in this context and will be released immediately.

Remarks

Microsoft Exchange calls the IExchExt::Install method to enable an extension object to determine the context into which it is being loaded, along with information about that context. The context is determined using the callback object returned in the lpeecb parameter. The user interface context is described by the value of the eecontext parameter.

IExchExtCallback::GetVersion is often called during Install to ensure that the version of the Microsoft Exchange client is compatible with your extension object.

IExchExtCallback::GetObject is often called during Install to determine whether the currently selected object in the Microsoft Exchange user interface is the type your extension object supports. When Install is called with the property sheet's context, your extension object should make sure the selected object matches the type of property sheet that is provided to the extension.

HRESULT return values other than S_OK and S_FALSE indicate that the extension object has encountered an error and Microsoft Exchange will not load the extension object.

See Also

IExchExtCallback::GetVersion, IExchExtCallback::GetObject