Share via


IUccCategoryInstance.CreatePublishableCategoryInstance 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.

Creates a write-able category instance for publication to publish this category instance.

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

Syntax

'Declaration
Function CreatePublishableCategoryInstance As IUccCategoryInstance
IUccCategoryInstance CreatePublishableCategoryInstance ()
IUccCategoryInstance^ CreatePublishableCategoryInstance ()
IUccCategoryInstance CreatePublishableCategoryInstance ()
function CreatePublishableCategoryInstance () : IUccCategoryInstance

Return Value

A value of the UccCategoryInstance** (IUccCategoryInstance, for a .NET application) type.

Remarks

An UccCategoryInstance cannot be updated or published unless it is first turned into a publishable category instance. This method is used to make this category instance into a publishable one. This limitation is important when a local user is attempting to re-publish an existing self-published category with additions or changes. For example: The local user has moved and needs to update the published home address. The publication process involves several steps:

  1. Get the existing IUccCategoryInstance whose context is "contactCard" from container 0.

  2. Create a new publishable IUccCategoryInstance by calling into CreatePublishableCategoryInstance on the obtained instance.

  3. Cast the obtained category instance to the IUccPresenceContactCardInstance interface to expose the appropriate methods and properties.

  4. Update the contact card as necessary. For specific information about updating a contact card, see IUccPresenceContactCardInstance.

  5. Re-publish the updated contact card.

Unlike the CreatePublishableCategoryInstance exposed by the publication manager, this method requires no parameters as the category instance already contains the necessary information to create a new publishable category instance.

Win32 COM/C++ Syntax

HRESULT CreatePublishableCategoryInstance
(
   IUccCategoryInstance** ppPublishableCategoryInstance
);

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 following example illustrates the creation of a publishable version of an existing category instance.

IUccCategoryInstance cat = pCategory.CategoryInstance.CreatePublishableCategoryInstance();

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

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