IUccSubscriptionEvent.GetOperationInfo Method
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 the status of completion of a subscription operation for a specified presentity.
Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)
Syntax
'Declaration
Function GetOperationInfo ( _
pPresentity As UccPresentity _
) As IUccOperationProgressEvent
IUccOperationProgressEvent GetOperationInfo (
UccPresentity pPresentity
)
IUccOperationProgressEvent^ GetOperationInfo (
UccPresentity^ pPresentity
)
IUccOperationProgressEvent GetOperationInfo (
UccPresentity pPresentity
)
function GetOperationInfo (
pPresentity : UccPresentity
) : IUccOperationProgressEvent
Parameters
- pPresentity
A value of the IUccPresentity* (UccPresentity, for a .NET application) type.
Return Value
A value of the IUccOperationProgressEvent** (IUccOperationProgressEvent, for a .NET application) type.
Remarks
A subscription can have 1 or more associated presentities. A subscription can be considered to succeed even when the subscription to a subset of the associated presentities has failed. The returned IUccOperationProgressEvent interface provides information about the status of each presentity subscription. Querying for this interface can return a COM exception in some cases. It is best to enclose the code that queries the property with a Try/Catch block specifically for the COMException exception type.
Win32 COM/C++ Syntax
HRESULT GetOperationInfo
(
IUccPresentity* pPresentity,
IUccOperationProgressEvent** ppOperationData
);
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 UCC API-defined HRESULT values, see Unified Communications Client API Error Codes.
Example
The following example handles the OnSubscribe event by getting the operation progress information for the presentity subscribed to. In this case, the handler is interested in the subscription returning the local user's own category instances.
void _IUccSubscriptionEvents.OnSubscribe(
UccSubscription pSubscription,
UccSubscriptionEvent pEventInfo)
{
try
{
IUccOperationProgressEvent opEvent = pEventInfo.GetOperationInfo(selfPresentity);
if (opEvent.IsComplete && opEvent.StatusCode >= 0)
{
//Raise event to indicate subscription success
else
{
//Subscription failed. Raise event to indicate failure
}
}
catch (COMException)
{ }
}
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
IUccSubscriptionEvent Interface
IUccSubscriptionEvent Members
Microsoft.Office.Interop.UccApi Namespace