OpenPrinter

Important

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 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:

  1. IPrintTicketProvider::GetSupportedVersions

  2. IPrintTicketProvider::BindPrinter

  3. IPrintTicketProvider::QueryDeviceNamespace

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.

diagram illustrating the openprinter calling sequence.

  1. For each plug-in, call IPrintOemPrintTicketProvider::GetSupportedVersions.

  2. For each plug-in, call IPrintOemPrintTicketProvider::BindPrinter.

  3. For each plug-in, call IPrintOemPrintTicketProvider::QueryDeviceDefaultNamespace.