IXpsSignatureManager interface (xpsdigitalsignature.h)
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:
Methods
The IXpsSignatureManager interface has these methods.
IXpsSignatureManager::AddSignatureBlock Creates a new IXpsSignatureBlock interface and adds it to the signature block collection. |
IXpsSignatureManager::CreateSigningOptions Creates a new IXpsSigningOptions interface. |
IXpsSignatureManager::GetSignatureBlocks Gets a pointer to an IXpsSignatureBlockCollection interface that contains a collection of signature blocks. |
IXpsSignatureManager::GetSignatureOriginPartName Gets the part name of the signature origin part. |
IXpsSignatureManager::GetSignatures Gets a pointer to an IXpsSignatureCollection interface that contains a collection of XPS digital signatures. |
IXpsSignatureManager::LoadPackageFile Loads an existing XPS package from a file into the digital signature manager. |
IXpsSignatureManager::LoadPackageStream Loads an XPS package from a stream into the digital signature manager. |
IXpsSignatureManager::SavePackageToFile Saves the XPS package to a file. |
IXpsSignatureManager::SavePackageToStream Saves the XPS package by writing it to a stream. |
IXpsSignatureManager::SetSignatureOriginPartName Sets the part name of the signature origin part. |
IXpsSignatureManager::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.
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 | xpsdigitalsignature.h |