MergeAndValidatePrintTicketThunk2 function

[This function is not supported and might be disabled or deleted in future versions of Windows. PTMergeAndValidatePrintTicket provides equivalent functionality and should be used instead.]

Merges two print tickets and returns a valid, viable print ticket.

Syntax

HRESULT MergeAndValidatePrintTicketThunk2(
  _In_      HPTPROVIDER hProvider,
  _In_      BYTE        *pBasePrintTicket,
  _In_      INT         basePrintTicketLength,
  _In_opt_  BYTE        *pDeltaPrintTicket,
  _In_      INT         deltaPrintTicketLength,
  _In_      DWORD       scope,
  _Out_     BYTE        **ppValidatedPrintTicket,
  _Out_     INT         *pValidatedPrintTicketLength,
  _Out_opt_ BSTR        *pbstrErrorMessage
);

Parameters

hProvider [in]

A handle to an open print ticket provider. This handle is returned by the BindPTProviderThunk function.

pBasePrintTicket [in]

The buffer that contains the base print ticket data, expressed in XML as described in the Print Schema.

basePrintTicketLength [in]

The size, in bytes, of the buffer referenced by pBasePrintTicket.

pDeltaPrintTicket [in, optional]

The buffer that contains the print ticket to merge. The print ticket data is expressed in XML as described in the Print Schema. The value of this parameter can be NULL.

deltaPrintTicketLength [in]

The size, in bytes, of the buffer referenced by pDeltaPrintTicket.

scope [in]

The value that specifies whether the scope of pDeltaPrintTicket and ppValidatedPrintTicket is a single page, an entire document, or all documents in the print job. The value of this parameter must be a member of the EPrintTicketScope enumeration, cast as a DWORD.

ppValidatedPrintTicket [out]

The address of the buffer that contains the merged and validated print ticket. This function calls CoTaskMemAlloc to allocate this buffer. When the buffer is no longer needed, the caller must free it by calling CoTaskMemFree.

pValidatedPrintTicketLength [out]

The size, in bytes, of the buffer referenced by ppValidatedPrintTicket.

pbstrErrorMessage [out, optional]

A pointer to a string that specifies what, if anything, is invalid about the print ticket in pBasePrintTicket or pDeltaPrintTicket. If they are both valid, this value is NULL. If pbstrErrorMessage is not NULL when the function returns, the caller must free the string with SysFreeString.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code. For more information about COM error codes, see Error Handling.

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
DLL
Prntvpt.dll

See also

Print Schema

PTMergeAndValidatePrintTicket

Printing

Print Spooler API Functions