Partager via


IXpsSignatureBlock::CreateRequest method

Creates a new IXpsSignatureRequest interface and adds it to the signature block.

Syntax

HRESULT CreateRequest(
  [in]          LPCWSTR              requestId,
  [out, retval] IXpsSignatureRequest **signatureRequest
);

Parameters

  • requestId [in]
    A string that uniquely identifies the new signature request within the signature block. For the method to generate an ID string, set this parameter to NULL.

  • signatureRequest [out, retval]
    A pointer to the new IXpsSignatureRequest interface. If access to the new request interface is not required, this parameter can be set to NULL.

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_UNEXPECTED

Either the interface is not connected to the signature manager, or requestId is NULL and a unique ID string could not be generated.

 

Remarks

The new signature request must have a unique request ID; no two requests may have the same ID string.

Creating a new request marks the signature block as dirty and generates new content for the SignatureDefinitions part. When the XPS package is serialized, the new content will overwrite the previous content in the SignatureDefinitions 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

IXpsSignatureBlock

IXpsSignatureManager

IXpsSignatureRequest

XPS Digital Signature API Errors

XPS Document Errors

XML Paper Specification