IUccProperty.ObjectValue Property
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.
Gets and sets the object value of the property.
Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)
Syntax
'Declaration
Property ObjectValue As Object
Object ObjectValue { get; set; }
property Object^ ObjectValue {
Object^ get ();
void set (Object^ value);
}
/** @property */
Object get_ObjectValue ()
/** @property */
void set_ObjectValue (Object value)
function get ObjectValue () : Object
function set ObjectValue (value : Object)
Property Value
A value of the IUnknown** (object, for a .NET application) type.
Remarks
An application should verify that a given property is set before accessing the property. An application must enclose a reference to a property ObjectValue within a try/catch block to catch the COM exception raised when an un-initialized value property is accessed on the IUccProperty instance.
Win32 COM/C++ Syntax
HRESULT get_ObjectValue
(
IUnknown** ppPropertyValue
);
HRESULT put_ObjectValue
(
IUnknown* ppPropertyValue
);
Note
In a Win32 application, the return value of a method or property is always an HRESULT value indicating the status of the call to the interface member. Any result of the operation is returned as a parameter marked with the [out, retval] attribute. In contrast, in a .NET application the HRESULT value indicating an error condition is returned as a COM exception and the [out, retval] parameter becomes the return value. For the Unified Communications Client API-defined HRESULT values, see Trace and Handle Errors in Unified Communications Client API.
Example
The following example returns a boolean value of true
when the object property value of interest is initialized and a false
value otherwise. The actual object value of the property is returned in an out parameter of the example method.
public Boolean GetPropertyObjectValue(
IUccPropertyCollection pPropertyCollection,
int propertyId,
out object propertyValue)
{
//initialize return value
Boolean returnValue = false;
//initialize out value of interested property boolean value
propertyValue = null;
//verify interested property was set
if (pPropertyCollection.IsPropertySet(propertyId))
{
//get interested property and fill returnValue with string value of property
IUccProperty property = pPropertyCollection.get_Property(propertyId);
try
{
propertyValue = property.ObjectValue;
returnValue = true;
}
catch
{
}
}
return returnValue;
}
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
IUccProperty Interface
IUccProperty Members
Microsoft.Office.Interop.UccApi Namespace