Share via


IMessengerConversationWnd::History

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.

Returns the text from the history of the conversation window. Not scriptable.

Syntax

HRESULT History(
   [out,
   retval] BSTR* bstrHistoryText
);

Parameters

  • bstrHistoryText
    Pointer to a BSTR that contains the text of the conversation window.

Return Value

Returns one of the following values. For managed code applications, these return values are received in the form of a COMException.

  • S_OK
    Success.
  • E_FAIL
    The client is not signed in to the primary service at the time this method is called or the conversation window is closed.
  • S_FALSE
    Cannot bring focus to the window.
  • RPC_X_NULL_REF_POINTER
    bstrHistoryText is a null pointer.

Remarks

The history property returns all the contents of the Office Communicator conversation window, including any error messages posted there. This property gives you the capability of archiving IM and conference conversation text. You cannot read this property in your event handler for the DMessengerEvents::OnIMWindowDestroyed event. The conversation history must be accessed to archive before the conversation window is closed.

Example

The example code reads the History property of the IMessengerConversationWnd interface object, imWindow, and displays the returned string on the application console window.

if (imWindow != null)
{
   try
   {
       Console.WriteLine(imWindow.History);
    }
    catch (COMException CE)
    {
        Console.WriteLine("COM Exception " + CE.ErrorCode.ToString());
     }
}

Requirements

  • Client
    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. .
  • Server
    Requires Microsoft Office Communications Server 2007, AV MCU (for Media Support), Media Relay (for NAT/Firewall traversal) on Microsoft Office Communications Server 2007.
  • Product
    Microsoft Office Communicator 2007 Automation API
  • IDL file
    Msgrua.idl

See Also

Reference

IMessengerConversationWnd