共用方式為


IXpsSignatureBlockCollection::RemoveAt method

Removes and releases an IXpsSignatureBlock interface pointer from a specified location in the collection.

Syntax

HRESULT RemoveAt(
   UINT32 index
);

Parameters

  • index
    The zero-based index in the collection from which an IXpsSignatureBlock interface pointer is to be removed and released.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.

Remarks

From the location specified by index, this method releases the interface referenced by an IXpsSignatureBlock pointer. The method then compacts the collection by reducing by 1 the index of each pointer subsequent to index. For more information about the collection methods, see Working with XPS OM Collection Interfaces.

Removing a signature block from the collection removes from the package the SignatureDefinitions part and relationship that correspond to that signature block. This removal breaks existing signatures. In addition, the SignatureDefinitions part name is removed from the list of required XPS parts, which prevents new signatures from including the removed signature block.

An interface that has been removed from a collection is no longer valid. If an application retains a pointer to the interface and tries to call one of its methods, the method will return XPS_E_OBJECT_DETACHED.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Xpsdigitalsignature.h

IDL

XpsDigitalSignature.idl

See also

IXpsSignatureBlockCollection

Working with XPS OM Collection Interfaces

IXpsSignatureBlock

XML Paper Specification