IOpcDigitalSignatureEnumerator::GetCurrent method (msopc.h)

Gets the IOpcDigitalSignature interface pointer at the current position of the enumerator.

Syntax

HRESULT GetCurrent(
  [out, retval] IOpcDigitalSignature **digitalSignature
);

Parameters

[out, retval] digitalSignature

An IOpcDigitalSignature interface pointer.

Return value

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

Return code/value Description
S_OK
The method succeeded.
E_POINTER
The partReference parameter is NULL.
OPC_E_ENUM_COLLECTION_CHANGED
0x80510050
The enumerator is invalid because the underlying set has changed.
OPC_E_ENUM_INVALID_POSITION
0x80510053
The enumerator cannot perform this operation from its current position.
OPC_E_DS_DUPLICATE_PACKAGE_OBJECT_REFERENCES
0x8051002D
The signature markup contains more than one Reference element that refers to the package Object element, but only one such Reference is allowed.
OPC_E_DS_DUPLICATE_SIGNATURE_PROPERTY_ELEMENT
0x80510028
The signature markup contains more than one SignatureProperty element that has the same Id attribute.
OPC_E_DS_EXTERNAL_SIGNATURE_REFERENCE
0x8051002F
A Reference element in the signature markup indicates an object that is external to the package. Reference elements must point to parts or Object elements that are internal.
OPC_E_DS_INVALID_CANONICALIZATION_METHOD
0x80510022
An unsupported canonicalization method was requested or used in a signature.
OPC_E_DS_INVALID_SIGNATURE_COUNT
0x8051002B
A Signature part does not contain the signature markup for exactly one signature.
OPC_E_DS_INVALID_SIGNATURE_XML
0x8051002A
The signature markup in a Signature part does not conform to the schema specified in the OPC or XML-Signature Syntax and Processing (http://www.w3.org/TR/xmldsig-core/).
OPC_E_DS_MISSING_CANONICALIZATION_TRANSFORM
0x80510032
A relationships transform must be followed by a canonicalization method.
OPC_E_DS_MISSING_PACKAGE_OBJECT_REFERENCE
0x8051002E
The signature markup is missing a Reference to the package-specific Object element.
OPC_E_DS_MISSING_SIGNATURE_ALGORITHM
0x8051002C
The signature markup does not specify signature method algorithm.
OPC_E_DS_MISSING_SIGNATURE_PART
0x80510020
The specified Signature part does not exist in the package.
OPC_E_DS_MISSING_SIGNATURE_PROPERTIES_ELEMENT
0x80510026
The SignatureProperties element was not found in the signature markup.
OPC_E_DS_MISSING_SIGNATURE_PROPERTY_ELEMENT
0x80510027
The SignatureProperty child element of the SignatureProperties element was not found.
OPC_E_DS_MISSING_SIGNATURE_TIME_PROPERTY
0x80510029
The SignatureProperty element with the Id attribute value of "idSignatureTime" does not exist or is not correctly constructed.
OPC_E_DS_MULTIPLE_RELATIONSHIP_TRANSFORMS
0x80510031
More than one relationships transform is specified for a Reference element, but only one relationships transform is allowed.
OPC_E_DS_REFERENCE_MISSING_CONTENT_TYPE
0x80510030
The URI attribute value of a Reference element in the signature markup does not include the content type of the referenced part.
OPC_E_DS_SIGNATURE_REFERENCE_MISSING_URI
0x80510043
The URI attribute is required for a Reference element but is missing.
OPC_E_UNEXPECTED_CONTENT_TYPE
0x80510005
Either the content type of a part differed from the expected content type (specified in the OPC, ECMA-376 Part 2), or the part content did not match the part's content type.

Remarks

When an enumerator is created, the current position precedes the first pointer. To set the current position to the first pointer of the enumerator, call the MoveNext method after creating the enumerator.

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

Digital Signatures Overview

Getting Started with the Packaging API

IOpcDigitalSignatureEnumerator

Overviews

Packaging API Programming Guide

Packaging API Reference

Packaging API Samples

Packaging Digital Signature Interfaces

Packaging Interfaces

Reference