This documentation is archived and is not being maintained.


This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Indicates that a conversation window has been closed. Scriptable.

HRESULT OnIMWindowDestroyed(
   [in] IDispatch* pIMWindow


[in] Pointer to an IDispatch interface on the IMessengerConversationWnd object that was destroyed.

The implementer of this event handler will determine what value should be returned.

It is not permissible to read properties such as HWND from pIMWindow with this event. By the time the local client communicator API application receives the event, the IM window in question has been destroyed. Attempting to read the HWND property of a window that does not exist raises an exception.

The example code illustrates how to handle an IM window destroyed event. The pIMWindow object is not referenced in this code except as a COM object to be released by Marshal.ReleaseComObject().

void communicator_OnIMWindowDestroyed(
     object pIMWindow)
        if (object.ReferenceEquals(pIMWindow, newIMWindow))
            StringBuilder sb = new StringBuilder();
               " IM WINDOW DESTROYED:");
                    "EVENT: " +
            imWindow = null;
            if (MessWindIntForm != null)
                MessWindIntForm.IMWindow = null;
    catch (NullReferenceException)
            "EVENT: " +
            "Null Reference exception IMWindow Destroyed");


Requires Microsoft DirectX 9.0, C Runtime libraries (msvcm80.dll) on Microsoft Windows© Vista, Microsoft Windows XP Service Pack 1 (SP1) or later, or Microsoft Windows 2000 with Service Pack 4 (SP4). Any Communicator-imposed restrictions apply. .


Requires Microsoft Office Communications Server 2007, AV MCU (for Media Support), Media Relay (for NAT/Firewall traversal) on Microsoft Office Communications Server 2007.


Microsoft Office Communicator 2007 Automation API

IDL file