_IUccCategoryInstanceEvents.OnCategoryInstanceValueModified 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 the value of the specified category instance changes.

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

Syntax

'Declaration
Sub OnCategoryInstanceValueModified ( _
    pCategoryInstance As IUccCategoryInstance, _
    pEventData As Object _
)
void OnCategoryInstanceValueModified (
    IUccCategoryInstance pCategoryInstance,
    Object pEventData
)
void OnCategoryInstanceValueModified (
    IUccCategoryInstance^ pCategoryInstance, 
    Object^ pEventData
)
void OnCategoryInstanceValueModified (
    IUccCategoryInstance pCategoryInstance, 
    Object pEventData
)
function OnCategoryInstanceValueModified (
    pCategoryInstance : IUccCategoryInstance, 
    pEventData : Object
)

Parameters

  • pCategoryInstance
    A value of the IUccCategoryInstance* (IUccCategoryInstance, for a .NET application) type. This specifies the category instance having its value modified.
  • pEventData
    A value of the IUnknown* (object, for a .NET application) type. This is currently set to NULL and is reserved for future use.

Remarks

The Unified Communications Client API defines a single event handler interface for category instance events regardless of category context. For this reason, it is necessary to examine the CategoryContext property of received category instance to determine the context of the received instance and process accordingly.

Win32 COM/C++ Syntax

HRESULT OnCategoryInstanceValueModified
(
   IUccCategoryInstance* pCategoryInstance,
   IUnknown* pEventData
);

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, Trace and Handle Errors in Unified Communications Client API.

Example

This example processes category instances associated with category instance data received from multiple category context sources. In this example, the client has advised for category instance events on category instances whose context is "state".

void _IUccCategoryInstanceEvents.OnCategoryInstanceValueModified(
    IUccCategoryInstance pEventSource, object pEventData)
{
   //process the updated "state" category instance
   if (pEventSource.CategoryContext.Name == "state")
   {
      IUccPresenceStateInstance state = pEventSource as IUccPresenceStateInstance;
      if (state != null)
      {
         switch (state.Type)
         {
            case UCC_PRESENCE_STATE_TYPE.UCCPST_AGGREGATE_STATE:
               Console.Writeline(state.Availability.ToString());
               break;
            case UCC_PRESENCE_STATE_TYPE.UCCPST_USER_STATE:
               Console.Writeline(state.Availability.ToString());
               break;
         }
      }
   }
}

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

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