IUccPresenceContactCardAddress 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 an address entry in a contact card of a user.

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

Syntax

'Declaration
Public Interface IUccPresenceContactCardAddress
    Inherits IUnknown
public interface IUccPresenceContactCardAddress : IUnknown
public interface class IUccPresenceContactCardAddress : IUnknown
public interface IUccPresenceContactCardAddress extends IUnknown
public interface IUccPresenceContactCardAddress extends IUnknown

Remarks

This interface is obtained from the collection of addresses held by an instance of IUccPresenceContactCardInstance. The collection must be iterated over to obtain an address instance of a specific type (UCC_CONTACT_CARD_ADDRESS_TYPE). Alternatively, a client can obtain an instance of IUccPresenceContactCardAddress by calling into CreateAddress on an instance of IUccPresenceContactCardInstance.

Win32 COM/C++ Syntax

interface IUccPresenceContactCardAddress : IUnknown

Example

The following example is drawn from an application class that wraps an instance of IUccPresenceContactCardInstance (this._ContactCard). The address collection is iterated over until an address of the specified type is found. The matching IUccPresenceContactCardAddress is returned.

/// <summary>
/// Iterate on an address collection to find an address object matching the 
/// passed address type
/// </summary>
/// <param name="phoneType">UCC_CONTACT_CARD_ADDRESS_TYPE type to find</param>
/// <returns>mathing UccPresenceContactCardAddress</returns>
public UccPresenceContactCardAddress GetAddressObject(UCC_CONTACT_CARD_ADDRESS_TYPE addressType)
{
    UccPresenceContactCardAddress returnValue = null;
    foreach (UccPresenceContactCardAddress address in this._ContactCard.Addresses)
    {
        if (address.Type == addressType)
        {
            returnValue = address;
            break;
        }
    }
    return returnValue;
}

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

IUccPresenceContactCardAddress Members
Microsoft.Office.Interop.UccApi Namespace