Skip to content

Latest commit

 

History

History
326 lines (274 loc) · 12.4 KB

nn-xpsdigitalsignature-ixpssignaturemanager.md

File metadata and controls

326 lines (274 loc) · 12.4 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
NN:xpsdigitalsignature.IXpsSignatureManager
IXpsSignatureManager (xpsdigitalsignature.h)
Manages the digital signatures and digital signature requests of an XPS document.
IXpsSignatureManager
IXpsSignatureManager interface [XPS Documents and Packaging]
IXpsSignatureManager interface [XPS Documents and Packaging]
described
xps.ixpssignaturemanager
xpsdigitalsignature/IXpsSignatureManager
xps\ixpssignaturemanager.htm
xps
31283ebe-91f4-42be-9a9b-6fcd641dc356
12/05/2018
IXpsSignatureManager, IXpsSignatureManager interface [XPS Documents and Packaging], IXpsSignatureManager interface [XPS Documents and Packaging],described, xps.ixpssignaturemanager, xpsdigitalsignature/IXpsSignatureManager
xpsdigitalsignature.h
Windows
Windows 7 [desktop apps only]
Windows Server 2008 R2 [desktop apps only]
XpsDigitalSignature.idl
Windows
19H1
IXpsSignatureManager
xpsdigitalsignature/IXpsSignatureManager
c++
APIRef
kbSyntax
COM
xpsdigitalsignature.h
IXpsSignatureManager

IXpsSignatureManager interface

-description

Manages the digital signatures and digital signature requests of an XPS document.

-inheritance

The IXpsSignatureManager interface inherits from the IUnknown interface. IXpsSignatureManager also has these types of members:

-members

The IXpsSignatureManager interface has these methods.

Method Description
AddSignatureBlock Creates a new IXpsSignatureBlock interface and adds it to the signature block collection.
CreateSigningOptions Creates a new IXpsSigningOptions interface.
GetSignatureBlocks Gets a pointer to an IXpsSignatureBlockCollection interface that contains a collection of signature blocks.
GetSignatureOriginPartName Gets the part name of the signature origin part.
GetSignatures Gets a pointer to an IXpsSignatureCollection interface that contains a collection of XPS digital signatures.
LoadPackageFile Loads an existing XPS package from a file into the digital signature manager.
LoadPackageStream Loads an XPS package from a stream into the digital signature manager.
SavePackageToFile Saves the XPS package to a file.
SavePackageToStream Saves the XPS package by writing it to a stream.
SetSignatureOriginPartName Sets the part name of the signature origin part.
Sign Signs the contents of an XPS package as specified by the signing options and returns the resulting digital signature.

-members

The IXpsSignatureManager interface has these methods.

Method Description
AddSignatureBlock Creates a new IXpsSignatureBlock interface and adds it to the signature block collection.
CreateSigningOptions Creates a new IXpsSigningOptions interface.
GetSignatureBlocks Gets a pointer to an IXpsSignatureBlockCollection interface that contains a collection of signature blocks.
GetSignatureOriginPartName Gets the part name of the signature origin part.
GetSignatures Gets a pointer to an IXpsSignatureCollection interface that contains a collection of XPS digital signatures.
LoadPackageFile Loads an existing XPS package from a file into the digital signature manager.
LoadPackageStream Loads an XPS package from a stream into the digital signature manager.
SavePackageToFile Saves the XPS package to a file.
SavePackageToStream Saves the XPS package by writing it to a stream.
SetSignatureOriginPartName Sets the part name of the signature origin part.
Sign Signs the contents of an XPS package as specified by the signing options and returns the resulting digital signature.

-remarks

To initialize the signature manager for use with an XPS document, instantiate an IXpsSignatureManager interface by calling CoCreateInstance as shown in the following example.

IXpsSignatureManager    *newInterface;

// Note the implicit requirement that CoInitializeEx
//  has previously been called from this thread.

hr = CoCreateInstance(
    __uuidof(XpsSignatureManager),
    NULL, 
    CLSCTX_INPROC_SERVER,
    __uuidof(IXpsSignatureManager),
    reinterpret_cast<LPVOID*>(&newInterface));

// make sure that you got a pointer
// to the interface
if (SUCCEEDED(hr)) {
    // Load document into signature manager from file.
    //  xpsDocument is initialized with the file name
    //  of the document to load outside of this example.
    hr = newInterface->LoadPackageFile (xpsDocument);

    // Use newInterface

    // Release interface pointers when finished with them
    newInterface->Release();
}

The interface instantiated by CoCreateInstance can be used by only one XPS document, which must be loaded by calling LoadPackageFile or LoadPackageStream before calling any other method.

After the IXpsSignatureManager interface has been instantiated and an XPS document has been loaded, the signature manager is ready for use.

-see-also

CoCreateInstance

Interfaces

XML Paper Specification