IXpsSignatureManager::LoadPackageStream method (xpsdigitalsignature.h)

Loads an XPS package from a stream into the digital signature manager.

Syntax

HRESULT LoadPackageStream(
  [in] IStream *stream
);

Parameters

[in] stream

The stream that contains the XPS package to be loaded.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For return values that are not listed in this table, see XPS Digital Signature API Errors and XPS Document Errors.

Return code Description
S_OK
The method succeeded.
E_POINTER
stream is NULL.
XPS_E_PACKAGE_ALREADY_OPENED
An XPS package has already been opened in the signature manager.

Remarks

After the interface has been instantiated, the XPS package must be loaded by calling this method or LoadPackageFile before calling any other method in this interface.

After an XPS package has been loaded into an instance of IXpsSignatureManager, calling LoadPackageFile or LoadPackageStream in the same instance will return an error.

After LoadPackageFile or LoadPackageStream has been called, the same object cannot be reused for another XPS package file or stream. To load another XPS package, a new instance of the IXpsSignatureManager must be instantiated.

LoadPackageStream does not validate all content of the XPS package; it does not, for example, detect invalid markup in a FixedPage part.

The implementation of the IStream interface that is passed in stream must support random read access. The implementation must also contain only an XPS package and be positioned at the beginning of the stream before it can be used by this method.

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

See also

IXpsSignatureManager

XML Paper Specification

XPS Digital Signature API Errors

XPS Document Errors