IUccPresenceContactCardIdentity 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 identity of a user described by a contact card.
Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)
Syntax
'Declaration
Public Interface IUccPresenceContactCardIdentity
Inherits IUnknown
public interface IUccPresenceContactCardIdentity : IUnknown
public interface class IUccPresenceContactCardIdentity : IUnknown
public interface IUccPresenceContactCardIdentity extends IUnknown
public interface IUccPresenceContactCardIdentity extends IUnknown
Remarks
The EmailAddresses collection of the IUccPresenceContactCardIdentity instance can be as empty as the DisplayName.
Win32 COM/C++ Syntax
interface IUccPresenceContactCardIdentity : IUnknown
Example
The following example obtains an instance of IUccPresenceContactCardIdentity from the IUccPresenceContactCardInstance instance (this._ContactCard
) wrapped by the application class that this example is drawn from. A possible COMException is trapped by a try/catch block in the event the contact card instance Identity property is not initialized.
/// <summary>
/// Returns an updated StringBuilder instance. contact card Identity appended to
/// existing string builder content
/// </summary>
/// <param name="sb">StringBuilder to update</param>
/// <param name="pCard">IuccPresenceContactCardInstance containing the remote user identity</param>
/// <returns>updated StringBuilder instance</returns>
private StringBuilder GetIdentity(StringBuilder sb, IUccPresenceContactCardInstance pCard)
{
// raises COM exception
try
{
if (this._ContactCard.Identity != null)
{
IUccPresenceContactCardIdentity cardIdentity = this._ContactCard.Identity;
sb.Append("Display Name: " + cardIdentity.DisplayName);
foreach (string emailAddress in cardIdentity.EmailAddresses)
{
sb.Append("Email Address: " + emailAddress);
}
}
}
catch (COMException)
{
}
return sb;
}
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
IUccPresenceContactCardIdentity Members
Microsoft.Office.Interop.UccApi Namespace