IUccEndpoint.Disable 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.

Disables the collaboration endpoint.

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

Syntax

'Declaration
Sub Disable ( _
    pOperationContext As UccOperationContext _
)
void Disable (
    UccOperationContext pOperationContext
)
void Disable (
    UccOperationContext^ pOperationContext
)
void Disable (
    UccOperationContext pOperationContext
)
function Disable (
    pOperationContext : UccOperationContext
)

Parameters

  • pOperationContext
    A value of the IUccOperationContext* (UccOperationContext, for a .NET application) type. The default value is NULL. A disabled endpoint is no longer registered with the underlying Office Communications Server.

Remarks

A disabled endpoint is not registered or no longer registered with the underlying Office Communications Server. An application can start a request to disable an endpoint by calling this method. The application can watch for the OnDisable event to determine whether the process completes successfully (StatusCode >= 0).

As part of the endpoint disabling process, the client platform removes all category instances from a given category context instance collection as well as category context from a given presentity collection. For this reason, a client receives OnCategoryInstanceRemoved and OnCategoryContextRemoved for all added category context and instance for a publishing presentity. If the client advised for category context and instance events on these instances, they should be un-advised for in the previously mentioned events. In a typical scenario, a client advises for hundreds of event sources which include platform, endpoint, subscription, publication, category context, category instance, session, and session participant events. Failure to unadvise for each advised event source results in a significant memory leak within the application process.

Win32 COM/C++ Syntax

HRESULT Disable
(
   IUccOperationContext* pOperationContext
);

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 Trace and Handle Errors in Unified Communications Client API.

Example

The example checks to see if the endpoint object is not null and calls the Disable method to begin the process of disabling the user endpoint. The process is complete when the endpoint has raised the OnDisable event.

// If endpoint is not null, sign out by calling Disable. The OnDisable event
// handler will then shut down the platform
if (this.endpoint != null)
{
    this.endpoint.Disable(null);
}

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

IUccEndpoint Interface
IUccEndpoint Members
Microsoft.Office.Interop.UccApi Namespace