Partager via


IXpsSignatureManager::LoadPackageFile method

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

Syntax

HRESULT LoadPackageFile(
  [in] LPCWSTR fileName
);

Parameters

  • fileName [in]
    The file name of 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

fileName 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 LoadPackageStream 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 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.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Xpsdigitalsignature.h

IDL

XpsDigitalSignature.idl

See also

IXpsSignatureManager

XPS Digital Signature API Errors

XPS Document Errors

XML Paper Specification