IUccPresenceContactCardInstance 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 a category instance as a contact card.

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


Public Interface IUccPresenceContactCardInstance
    Inherits IUnknown
public interface IUccPresenceContactCardInstance : IUnknown
public interface class IUccPresenceContactCardInstance : IUnknown
public interface IUccPresenceContactCardInstance extends IUnknown
public interface IUccPresenceContactCardInstance extends IUnknown


This interface can be queried from an IUccCategoryInstance object. A contact card describes the contact information about a user. It is created when the contact information is published as a "contactCard" IUccCategoryInstance object.

An instance of IUccPresenceContactCardInstance is obtained from a subscription to a remote user's contact card or the local user's self-subscription. A subscribed contact's contact card instance is provided to a local user as an OnCategoryInstanceValueModified event.

To publish a local user's own updated contact card, a contact card instance is obtained from a container provisioned in a self-subscription to the "containers" category context.with a call into GetCategoryInstances on the container category instance, passing the desired container name.


The IUccPublicationManager exposes a GetPresenceCategoryName method that takes an enum UCC_PRESENCE_CATEGORY_TYPE and returns the desired category name as string.

The obtained category instance is used to generate a publishable category instance. The publishable instance is then modified as needed and published.

Win32 COM/C++ Syntax

interface IUccPresenceContactCardInstance : IUnknown


The following simple event handler compares the category context name of the received category instance to "contactCard". If the values match, the example obtains an IUccPresenceContactCardInstance interface from the event source.

/// <summary>
/// this event handler is called when a subscribed category instance
/// value is changed. This method handles category instance change
/// events for category instances across all subscribed category context
/// </summary>
/// <param name="pEventSource">category context whose instance value changed</param>
/// <param name="pEventData">event specific data</param>
void _IUccCategoryInstanceEvents.OnCategoryInstanceValueModified(
   IUccCategoryInstance pEventSource, object pEventData)
   StringComparer strComparer = StringComparer.Create(

   //process the updated "contactCard" category instance
   if (strComparer.Compare(
   "contactCard") == 0)
      IUccPresenceContactCardInstance card = pEventSource as IUccPresenceContactCardInstance;


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


IUccPresenceContactCardInstance Members
Microsoft.Office.Interop.UccApi Namespace