IOpcSignatureCustomObjectSet::Create method (msopc.h)

Creates an IOpcSignatureCustomObject interface pointer to represent an application-specific Object element in the signature, and adds the new interface to the set.

Syntax

HRESULT Create(
  [in]          const UINT8               *xmlMarkup,
  [in]          UINT32                    count,
  [out, retval] IOpcSignatureCustomObject **customObject
);

Parameters

[in] xmlMarkup

A buffer that contains the XML markup for the Object element to be represented.

This XML markup must include the opening Object and closing /Object tags.

The encoding of the markup contained in xmlMarkup will be inferred. Inclusion of a byte order mark at the beginning of the buffer passed in xmlMarkup is optional.

The following encodings and byte order mark values are supported:

Encoding Description Byte order mark
UTF8 UTF-8 EF BB BF
UTF16LE UTF-16, little endian FF FE
UTF16BE UTF-16, big endian FE FF

[in] count

The size of the xmlMarkup buffer.

[out, retval] customObject

A new IOpcSignatureCustomObject interface pointer that represents the application-specific Object element.

This parameter can be NULL if a pointer to the new interface is not needed.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
E_INVALIDARG
The count parameter is 0. The xmlMarkup parameter must be passed valid XML markup.
E_POINTER
The xmlMarkup parameter is NULL.

Remarks

An IOpcSignatureCustomObject interface pointer provides access to the XML markup of the Object element it represents. To access the XML markup of the Object element, call the IOpcSignatureCustomObject::GetXml method.

When an IOpcSignatureCustomObject interface pointer is created and added to the set, the Object it represents is saved when the package is saved.

Thread Safety

Packaging objects are not thread-safe.

For more information, see the Getting Started with the Packaging API.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header msopc.h

See also

Core Packaging Interfaces

Getting Started with the Packaging API

IOpcSignatureCustomObjectSet

Overviews

Packaging API Programming Guide

Packaging API Reference

Packaging API Samples

Packaging Digital Signature Interfaces

Packaging Interfaces

Reference