Share via


_IUccPresentityEvents.OnCategoryContextRemoved Method

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.

Raised when a category context is removed from the specified presentity object.

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

Syntax

'Declaration
Sub OnCategoryContextRemoved ( _
    pPresentity As UccPresentity, _
    pCategoryCtxtEvent As UccCategoryContextEvent _
)
void OnCategoryContextRemoved (
    UccPresentity pPresentity,
    UccCategoryContextEvent pCategoryCtxtEvent
)
void OnCategoryContextRemoved (
    UccPresentity^ pPresentity, 
    UccCategoryContextEvent^ pCategoryCtxtEvent
)
void OnCategoryContextRemoved (
    UccPresentity pPresentity, 
    UccCategoryContextEvent pCategoryCtxtEvent
)
function OnCategoryContextRemoved (
    pPresentity : UccPresentity, 
    pCategoryCtxtEvent : UccCategoryContextEvent
)

Parameters

  • pPresentity
    A value of the IUccPresentity* (UccPresentity, for a .NET application) type. This represents the publisher of the removed category context.

Remarks

This event is received for both self-presentity category context and remote user presentity category context. In both cases, a client should unadvise for the IUccCategoryContext object retrieved by reading the CategoryContext value from the IUccCategoryContextEvent and providing the value as the event sink when un-advising for events.

A local client receives this event for each subscribed category context at the time the client has called into Disable on the endpoint instance.The OnCategoryContextRemoved event is also received when the local client has unsubscribed to the category context or called into RemovePresentity. The client will no longer receive category context events for the removed category context.

Win32 COM/C++ Syntax

HRESULT OnCategoryContextRemoved
(
   IUccPresentity* pPresentity,
   IUccCategoryContextEvent* pCategoryCtxtEvent
);

Note

In a Win32 application, the return value of a method or property is always an HRESULT value indicating the status of the call to the interface member. Any result of the operation is returned as a parameter marked with the [out, retval] attribute. In contrast, in a .NET application the HRESULT value indicating an error condition is returned as a COM exception and the [out, retval] parameter becomes the return value. For the UCC API-defined HRESULT values, see Trace and Handle Errors in Unified Communications Client API .

Example

The example handles the OnCategoryContextRemoved event. The essential task it accomplishes is to unadvise for the category context events previously advised for on this category context object.

void _IUccPresentityEvents.OnCategoryContextRemoved(
    UccPresentity pEventSource, 
    UccCategoryContextEvent pEventData)
{
    UCC_Unadvise<_IUccCategoryContextEvents>(
        pEventData.CategoryContext, this);
}

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

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

See Also

Reference

_IUccPresentityEvents Interface
_IUccPresentityEvents Members
Microsoft.Office.Interop.UccApi Namespace

Other Resources

Code Listing: Basic Event Registration and Other Helper Methods in C#