IOpcFactory::CreateDigitalSignatureManager method

Creates a digital signature manager object for a package object.

Syntax


HRESULT CreateDigitalSignatureManager(
  [in]          IOpcPackage                 *package,
  [out, retval] IOpcDigitalSignatureManager **signatureManager
);

Parameters

package [in]

A pointer to the IOpcPackage interface of the package object to associate with the digital signature manager object.

signatureManager [out, retval]

A pointer to the IOpcDigitalSignatureManager interface of the digital signature manager object that is created for use with the package object.

A digital signature manager object provides access to the Packaging API's digital signature interfaces and methods. These can be used to sign the package represented by the package object or to validate the signatures in a package that has already been signed.

Return value

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

Return code/valueDescription
S_OK

The method succeeded.

E_NOTIMPL

This method is not implemented for this version of Windows.

OPC_E_DS_DUPLICATE_SIGNATURE_ORIGIN_RELATIONSHIP
0x8051001B

More than one relationship of the digital signature origin relationship type exists, but only one such relationship is allowed.

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

OPC_E_DS_INVALID_SIGNATURE_ORIGIN_RELATIONSHIP
0x8051001C

A package relationship of type digital signature origin is targeting a location that is external to the package. Digital Signature Origin parts must be located internally.

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

OPC_E_DS_MISSING_SIGNATURE_ORIGIN_PART
0x8051001F

A relationship of type digital signature origin was found, but the Digital Signature Origin part itself was not.

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

 

Remarks

If a package is modified while Packaging Digital Signature Interfaces are being used to sign the package, signing may fail or result in an inconsistent signature or package.

Support on Previous Versions of Windows

This method is not supported on versions of Windows prior to Windows 7. For more information, see Getting Started with the Packaging API, and Platform Update for Windows Vista.

Thread Safety

Packaging objects are not thread-safe.

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

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Msopc.h

IDL

Msopc.idl

See also

IOpcFactory
Overviews
Digital Signatures Overview
Getting Started with the Packaging API
Packaging API Programming Guide
Platform Update for Windows Vista
Reference
Music Bundle Signature Sample
Packaging Errors
Packaging API Reference
Packaging API Samples
External Resources
ECMA-376 OpenXML

 

 

Community Additions

ADD
Show: