Skip to content

Latest commit

 

History

History
256 lines (190 loc) · 7.36 KB

nf-msopc-iopccertificateenumerator-getcurrent.md

File metadata and controls

256 lines (190 loc) · 7.36 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:msopc.IOpcCertificateEnumerator.GetCurrent
IOpcCertificateEnumerator::GetCurrent (msopc.h)
Gets the CERT_CONTEXT structure at the current position of the enumerator.
GetCurrent
GetCurrent method [Open Packaging Conventions]
GetCurrent method [Open Packaging Conventions]
IOpcCertificateEnumerator interface
IOpcCertificateEnumerator interface [Open Packaging Conventions]
GetCurrent method
IOpcCertificateEnumerator.GetCurrent
IOpcCertificateEnumerator::GetCurrent
msopc/IOpcCertificateEnumerator::GetCurrent
opc.iopccertificateenumerator_getcurrent
opc\iopccertificateenumerator_getcurrent.htm
OPC
edd2afc1-cafd-4a52-b2df-1a1fcdf1d6fa
12/05/2018
GetCurrent, GetCurrent method [Open Packaging Conventions], GetCurrent method [Open Packaging Conventions],IOpcCertificateEnumerator interface, IOpcCertificateEnumerator interface [Open Packaging Conventions],GetCurrent method, IOpcCertificateEnumerator.GetCurrent, IOpcCertificateEnumerator::GetCurrent, msopc/IOpcCertificateEnumerator::GetCurrent, opc.iopccertificateenumerator_getcurrent
msopc.h
Windows
Windows 7 [desktop apps only]
Windows Server 2008 R2 [desktop apps only]
OpcDigitalSignature.idl
Windows
19H1
IOpcCertificateEnumerator::GetCurrent
msopc/IOpcCertificateEnumerator::GetCurrent
c++
APIRef
kbSyntax
COM
msopc.h
IOpcCertificateEnumerator.GetCurrent

IOpcCertificateEnumerator::GetCurrent

-description

Gets the CERT_CONTEXT structure at the current position of the enumerator.

-parameters

-param certificate [out, retval]

A pointer to a CERT_CONTEXT structure. If the method succeeds, call the CertFreeCertificateContext function to free the memory of the structure.

-returns

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_EXTERNAL_SIGNATURE
0x8051001E
A relationship whose target is a Signature part has the external target mode; Signature parts must be inside of the package.
OPC_E_DS_INVALID_CERTIFICATE_RELATIONSHIP
0x8051001D
A relationship of type digital signature certificate has the external target mode.

For more information about this relationship type, see the OPC.

OPC_E_DS_INVALID_RELATIONSHIP_TRANSFORM_XML
0x80510021
A Transform element that indicates the use of the relationships transform and the selection criteria for the transform does not conform to the schema specified in the OPC.
OPC_E_DS_MISSING_CERTIFICATE_PART
0x80510056
The part that contains the certificate and is the target of a relationship of type digital signature certificate does not exist.

For more information about this relationship type, see the OPC.

OPC_E_DS_SIGNATURE_PROPERTY_MISSING_TARGET
0x80510045
The SignatureProperty element is missing the required Target attribute.
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

If the certificate represented by the CERT_CONTEXT structure is corrupted or is not an X.509 certificate, this method will return an error; further, the signing policy used by the caller dictates whether the signature will still be validated. After this kind of error is returned, calls to the MoveNext or MovePrevious method will continue to iterate through the enumerator.

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

Thread Safety

Packaging objects are not thread-safe.

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

-see-also

Certificates

Core Packaging Interfaces

Digital Signatures Overview

Getting Started with the Packaging API

IOpcCertificateEnumerator

IOpcCertificateSet

Overviews

Packaging API Programming Guide

Packaging API Reference

Packaging API Samples

Packaging Interfaces

Reference