IUccProperty 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 property as a name-value pair.

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

Syntax

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

Remarks

In the Unified Communications Client API, a property is defined as an ID-value (or name-value) pair. The property is identified by a number (ID) or a string (Name). The data type of the property value varies. For a Unified Communications Client-API supported property, the property ID is defined in an appropriate UCC_*_PROPERTY enumeration type. Named properties are useful for application-defined properties.

The IUccProperty interface is the default interface of the UccProperty class. This class cannot be cocreated. Instead, an application gets a reference to an instance of the interface from a property collection (UccPropertyCollection or IUccReadOnlyPropertyCollection).

An IUccProperty instance can hold a single value. For example, if the StringValue is set on an IUccProperty instance, setting the NumericValue on that same instance replaces the original string value with a number. Attempting to access the StringValue after it has been replaced with a NumericValue results in a COM exception. If any of string, numeric, or object values have been set, the Value property returns an object representing the value set into one of the type specific properties.

Win32 COM/C++ Syntax

interface IUccProperty : IUnknown

Example

The following example returns the string value of an IUccProperty instance given a property Id.

private string GetPropertyStringValue(
   IUccReadOnlyPropertyCollection pCollection,
   int propertyId)
{
   //initialize return value
   string returnValue = string.Empty;

   //verify interested property was set
   if (pCollection.IsPropertySet(propertyId))
   {
      //get property and fill returnValue with string value of property
      IUccProperty property = pCollection.get_Property(propertyId);
      returnValue = property.StringValue;
   }
   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

IUccProperty Members
Microsoft.Office.Interop.UccApi Namespace