OpenPrinter
Important
The modern print platform is Windows' preferred means of communicating with printers. We recommend that you use Microsoft's IPP inbox class driver, along with Print Support Apps (PSA), to customize the print experience in Windows 10 and 11 for printer device development.
For more information, see Modern print platform and the Print support app design guide.
When a print queue is opened using the OpenPrinter function, the print driver is loaded and the following methods of the IPrintTicketProvider interface are called in this order:
The methods of the IPrintTicketProvider interface in a Unidrv or PScript5 print driver call the IPrintOemPrintTicketProvider interface methods of the each plug-in hosted by the driver. The following illustration and list show how these calls are made when OpenPrinter is called.
For each plug-in, call IPrintOemPrintTicketProvider::GetSupportedVersions.
For each plug-in, call IPrintOemPrintTicketProvider::BindPrinter.
For each plug-in, call IPrintOemPrintTicketProvider::QueryDeviceDefaultNamespace.