IExchExtModelessCallback::ReleaseWindow

Enables the Microsoft Exchange client to be notified when an extension object's modeless windows have been removed.

Quick Info

See IExchExtModelessCallback : IUnknown.

HRESULT ReleaseWindow()

Return Values

S_OK
No error occurred.

Remarks

Extension objects should call the IExchExtModelessCallback::ReleaseWindow method when they release all their modeless windows. This method, along with the IExchExtModelessCallback::AddWindow method, enables the Microsoft Exchange client to keep track of modeless windows displayed by extensions. Microsoft Exchange cannot be closed until all extension windows have been closed.

Extensions are expected to make an equal number of calls to AddWindow and ReleaseWindow. For example, if an extension calls AddWindow for every modeless window it displays, it should call ReleaseWindow for each modeless window it closes. Similarly, if an extension calls AddWindow only once for its modeless windows, it should call ReleaseWindow only once when the last of the extension's modeless windows is closed.

To enable users to exit Microsoft Exchange with one command, modeless extensions should intercept the Exit and Exit and Log off commands on the Microsoft Exchange File menu. By doing so, extensions can prompt the user to save any changes that have been made and then close the user's modeless windows, returning S_FALSE to enable other extensions to close their windows as well. In this way, extensions can cooperate with Microsoft Exchange when a user wants to close all windows and exit.

See Also

IExchExtModelessCallback::AddWindow