UccPresenceContactCardInstance Class
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.
Illustrates the implementation of a contact card category instance. The class cannot be co-created.
Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)
Syntax
'Declaration
Public MustInherit Class UccPresenceContactCardInstance
public abstract class UccPresenceContactCardInstance
public ref class UccPresenceContactCardInstance abstract
public abstract class UccPresenceContactCardInstance
public abstract class UccPresenceContactCardInstance
Remarks
This class implements the IUccPresenceContactCardInstance and IUccCategoryInstance interfaces. The default interface is IUccPresenceContactCardInstance. An application obtains the default interface on the class instance directly. Non-default interfaces, if any, can be obtained by calling QueryInterface on the default interface. An instance of this class is also a source of the events defined in the _IUccCategoryInstanceEvents dispinterface. This class cannot be co-created. It is intended to illustrate that the implemented interfaces can be queried from each other as well as the events raised in an instance of this class.
Win32 COM/C++ Syntax
coclass UccPresenceContactCardInstance
{
[default] interface IUccPresenceContactCardInstance;
interface IUccCategoryInstance;
[default, source] dispinterface _IUccCategoryInstanceEvents;
};
Inheritance Hierarchy
System.Object
Microsoft.Office.Interop.UccApi.UccPresenceContactCardInstance
Example
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(
System.Globalization.CultureInfo.CurrentCulture,
true);
//process the updated "contactCard" category instance
if (strComparer.Compare(
pEventSource.CategoryContext.Name,
"contactCard") == 0)
{
IUccPresenceContactCardInstance card = pEventSource as IUccPresenceContactCardInstance;
}
}
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
UccPresenceContactCardInstance Members
Microsoft.Office.Interop.UccApi Namespace