IMessengerWindow::Close method
[Close is no longer available for use as of Windows Vista. See Windows Messenger for more information.]
Closes a Messenger window. If the window is a conversation window, terminates any sessions contained in it.
Syntax
HRESULT Close();
Parameters
This method has no parameters.
Return value
Type: HRESULT
Returns one of the following values.
Return code | Description |
---|---|
|
Success. |
|
Messenger window was already closed. |
|
Could not get window handle. |
Remarks
The following table lists error codes returned by this method.
Error Code | Meaning |
---|---|
0x80004005 | Could not get window handle. |
Windows that are being closed while some actions are still in progress may return confirmation dialog boxes to the user, which will hang up the application until the user responds.
Closing the main application window effectively "knocks it into the tray." The object is still active and maintains a process, but does not appear on the taskbar. Closing a conversation window essentially de-references it. Further IMessengerWindow calls against that window will be invalid because the window and its internal object have been completely removed, not just hidden, from the client. After a conversation window has been closed, any pointers to it should be cleaned up.
Note
This method is not available for scripting languages.
Examples
The following Visual Basic example shows the use of this method.
Public WithEvents MsgrUIA As MessengerAPI.Messenger
Public MsgrWindow As MessengerAPI.IMessengerWindow
Private Sub cmd_W_Close_Click()
MsgrWindow.Close
End Sub
Requirements
Header |
|
IDL |
|
DLL |
|