IUccPlatform 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.

The singleton instance of the application framework of the UCC API.

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

Syntax

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

Remarks

This interface exposes the application-wide settings and device management and acts as an endpoint factory. An application must obtain and initialize this interface object before using any other UCC API features. An application obtains this interface by co-creating a UccPlatform coclass object.

Each application process can create only a single instance of this interface. After the initial creation of the platform class object, subsequent attempts to instantiate the platform class return a reference to this already created interface object.

A client must call the Initialize method to provide the platform object with the name of the client process. If platform tracing is enabled, the platform creates a tracing log file using the provided client process name. For information about enabling platform tracing, see IUccTraceSettings. The registry key <client application name> value is set with the string parameter passed to the platform in the Initialize method

The IUccPlatform interface object raises events that should be handled by an interested client. The following example initiates the interface and advises for platform events.

See _IUccPlatformEvents for information about these events. For information about advising for events, see Code Listing: Basic Event Registration and Other Helper Methods in C#.

Win32 COM/C++ Syntax

interface IUccPlatform : IUnknown

Example

The following example instantiates a new instance of the UccPlatform class. The new class object is cast to its default interface and examined for the hash code property. The subsequent cast to iP2 returns a reference to the initially casted interface. This is verified by comparing the int pointer to the IUnknown interface instance values returned by the calls to Marshal.GetIUnknownForObject( ).

UccPlatform platform = new UccPlatformClass();

//2nd call to new does not create a new instance.
//instead, returns the first instance again
UccPlatform platform2 = new UccPlatformClass();

IUccPlatform iP = platform as IUccPlatform;
IntPtr platformPtr = Marshal.GetIUnknownForObject(iP);

IUccPlatform iP2 = platform2 as IUccPlatform;
IntPtr platformPtr2 = Marshal.GetIUnknownForObject(iP2);
//platformPtr == platformPtr2

platform.Initialize("sampleUCCPClient", null);
//advise for platform events (Event source, Event sink, int identifier of e source)  
UCC_Advise<_IUccPlatformEvents>(
   platform,
   this);

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

IUccPlatform Members
Microsoft.Office.Interop.UccApi Namespace

Other Resources

Code Listing: Basic Event Registration and Other Helper Methods in C#