Share via


IMessengerWindow::HWND property

[HWND is no longer available for use as of Windows Vista. See Windows Messenger for more information.]

Retrieves a window handle to a Messenger window.

This property is read-only.

Syntax

HRESULT get_HWND(
  [out, retval] long *phWnd
);

Property value

Pointer to a LONG that receives a HWND handle to this Messenger window.

Error codes

Returns one of the following values.

Name Meaning
S_OK
Success.
RPC_X_NULL_REF_POINTER
phWnd is a NULL pointer.
E_FAIL
Could not get window handle.
E_NOTIMPL
Cannot be accessed through scripting.

Remarks

The following table lists error codes returned by this method.

Error Code Meaning
0x80004001 Cannot be accessed through scripting.
0x80004005 Messenger application window or conversation window has been closed either through user action or the method that launched the window.

Unlike the Messenger application, there can be more than one conversation window and therefore multiple HWNDs.

If called on the IMessengerWindow interface of the application's Messenger window, it will return an HWND for the parent application.

Note

This property is not available for scripting languages.

Requirements

End of client support
Windows XP
End of server support
Windows Server 2003
Header
Msgrua.h
IDL
Msgrua.idl
DLL
Msgsc.dll

See also

IMessengerWindow

IMessenger