IUccCategoryInstance.PublicationOperation Property

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.

Specifies how this category instance is to be published.

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

Syntax

'Declaration
WriteOnly Property PublicationOperation As UCC_PUBLICATION_OPERATION_TYPE
UCC_PUBLICATION_OPERATION_TYPE PublicationOperation { set; }
property UCC_PUBLICATION_OPERATION_TYPE PublicationOperation {
    void set (UCC_PUBLICATION_OPERATION_TYPE value);
}
/** @property */
void set_PublicationOperation (UCC_PUBLICATION_OPERATION_TYPE value)
function set PublicationOperation (value : UCC_PUBLICATION_OPERATION_TYPE)

Property Value

A value of the UCC_PUBLICATION_OPERATION_TYPE (UCC_PUBLICATION_OPERATION_TYPE, for a .NET application) type.

Remarks

This property is used by the client platform in conjunction with a category instance publishing event. A COM exception is raised by the publication object if the PublicationOperation is not set correctly before publishing the category instance. To publish a new category instance, the publication operation must be set to UCC_PUBLICATION_OPERATION_TYPE.UCCPOT_ADD. To remove a previously published category instance, set the publication operation to UCC_PUBLICATION_OPERATION_TYPE.UCCPOT_REMOVE. To update an existing category instance, set the publication operation to UCC_PUBLICATION_OPERATION_TYPE.UCCPOT_ADD. The PublicationOperation must not be null when the category instance is added to the category instance collection of the publication object (IUccPublication).

Win32 COM/C++ Syntax

HRESULT put_PublicationOperation
(
   UCC_PUBLICATION_OPERATION_TYPE enPublicationOperation
);

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 publishes a new instance of a category.

private void PublishCategoryInstance(IUccCategoryInstance cat)
{
    IUccPublication pub = pubMgr.CreatePublication() as IUccPublication;
    if (pub != null)
    {
        UCC_Advise<_IUccPublicationEvent>(pub, this);
        cat.PublicationOperation = UCC_PUBLICATION_OPERATION_TYPE.UCCPOT_ADD;
        pub.AddPublishableCategoryInstance(cat);
        pub.Publish(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

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