Skip to content

Latest commit

 

History

History
77 lines (60 loc) · 2.91 KB

nf-prdrvcom-iprintticketprovider-convertdevmodetoprintticket.md

File metadata and controls

77 lines (60 loc) · 2.91 KB
UID tech.root title ms.date targetos description prerelease req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs helpviewer_keywords
NF:prdrvcom.IPrintTicketProvider.ConvertDevModeToPrintTicket
print
IPrintTicketProvider::ConvertDevModeToPrintTicket (prdrvcom.h)
08/29/2022
Windows
The IPrintTicketProvider::ConvertDevModeToPrintTicket method converts a DEVMODEW structure into a print ticket.
false
function
prdrvcom.h
Prdrvcom.h
apiref
COM
prdrvcom.h
IPrintTicketProvider::ConvertDevModeToPrintTicket
IPrintTicketProvider::ConvertDevModeToPrintTicket
prdrvcom/IPrintTicketProvider::ConvertDevModeToPrintTicket
c++
ConvertDevModeToPrintTicket

-description

The IPrintTicketProvider::ConvertDevModeToPrintTicket method converts a DEVMODEW structure into a print ticket.

-parameters

-param cbDevmode [in]

The size, in bytes, of the input DEVMODEW structure. The size includes both the public and private portions of this structure.

-param pDevmode [in]

A pointer to the input DEVMODEW structure, including its public and private portions.

-param pPrintTicket [in]

A pointer to the partially-completed print ticket. When IPrintTicketProvider::ConvertDevModeToPrintTicket returns, all entries in the print ticket should be filled in.

-returns

IPrintTicketProvider::ConvertDevModeToPrintTicket should return S_OK if the operation succeeds. Otherwise, this method should return a standard COM error code.

-remarks

When the print system converts the contents of a DEVMODEW structure into a print ticket, it converts all of the public DEVMODEW fields except those that the plug-in provider has indicated should be disabled. For these DEVMODEW fields that are disabled and not converted, the plug-in provider is responsible for populating the corresponding print ticket values. If the DEVMODEW snapshot was disabled during a call to IPrintTicketProvider::BindPrinter, the representation from the conversion must provide enough information to reconstruct the original DEVMODEW structure from the print ticket without loss of information.

The DEVMODEW snapshot allows support for subtle distinctions in options provided in the DEVMODEW structure for which the print ticket might not have representations. For example, DEVMODEW might support the LETTER paper size while the print ticket supports the LETTERSMALL paper size.

-see-also

IPrintTicketProvider

IPrintTicketProvider::ConvertPrintTicketToDevMode