This documentation is archived and is not being maintained.

IUccIncomingInstantMessageEvent Interface

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.

Encapsulates the event data as part of an incoming invitation of an instant messaging session.

Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)

public interface IUccIncomingInstantMessageEvent : IUccIncomingRequestEvent, IUnknown
public interface IUccIncomingInstantMessageEvent extends IUccIncomingRequestEvent, IUnknown
public interface IUccIncomingInstantMessageEvent extends IUccIncomingRequestEvent, IUnknown

This interface inherits from the IUccIncomingRequestEvent interface. It represents an instance of invitation to an incoming IM session. The members defined here represents IM-specific data needed for establishing an IM session.

Win32 COM/C++ Syntax

interface IUccIncomingInstantMessageEvent : IUccIncomingRequestEvent

The following callback method handles the OnInstantMessageReceived event by displaying the User name of the sending participant along with the text of the message.

/// <summary>
/// displays incoming instant message text in the local system console
/// </summary>
/// <param name="pEventSource">UccInstantMessagingSessionParticipant participant sending the message</param>
/// <param name="pEventData">UccIncomingInstantMessageEvent The message</param>
void _IUccInstantMessagingSessionParticipantEvents.OnInstantMessageReceived(
    UccInstantMessagingSessionParticipant pEventSource, 
    UccIncomingInstantMessageEvent pEventData)
{
    IUccSessionParticipant sendingParticipant = pEventSource as IUccSessionParticipant;
    
    if (pEventData.ContentType == "text/plain")
    {
        Console.WriteLine(
            pEventData.ParticipantEndpoint.Participant.Uri.User + 
            ": " +
            pEventData.Content);
    }

}

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2000 with Service Pack 4, Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Show: