Reading and Setting Unified Communications Client API Interface Properties
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.
In COM, an interface property is defined as an interface method. In IDL, a property is declared with the propget or propput attribute depending on whether the property is readable or writable. For example, in Unified Communications Client API the IUccContact interface has a read-write Uri property. Its definition in IDL (Microsoft.Office.Interop.UccApi.idl) is listed as follows.
[propget, helpstring("Gets the SIP URI of this contact.")] HRESULT Uri( [out, retval] IUccUri **ppUri); [propput, helpstring("Sets the SIP URI of this contact.")] HRESULT Uri( IUccUri *pUri);
However, in the corresponding C/C++ header file (Microsoft.Office.Interop.UccApi.h) the same definition appears as follows.
// Readable property virtual HRESULT STDMETHODCALLTYPE get_Uri(IUccUri **ppUri) = 0; // Writable property virtual HRESULT STDMETHODCALLTYPE put_Uri(IUccUri *pUri) = 0;
The programming pattern therefore differs depending on whether an application is written in C/C++ or some other languages supported by OLE Automation (such as a Visual Basic), COM Interop (such as a .NET application), or COM Interop client (such as a .NET application).