Bewerken

Delen via


Publishing the Interfaces

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.

Plug-ins typically receive instances of objects that implement behavior in the core drivers by a mechanism called publishing. The IPrintCoreHelper, IPrintCoreHelperPS, and IPrintCoreHelperUni helper interfaces are published by means of that same model, with a few minor differences.

The following lists summarize the order in which objects are published in user interface (UI) and render modules, for both Unidrv and Pscript5. For each of the four modules, the number in the list indicates the order in which an object is published, and the COM interfaces that are named indicate which interfaces that the object implements.

In any given module, the driver should keep only one of the objects published by saving a pointer and calling the AddRef method on that object. After the plug-in stores the reference to the object, the plug-in should return S_OK. The core driver will then stop publishing interfaces. This model is not significantly different from the previous publication mechanism.

In the UI context, the objects are published to the IPrintOemUI interface on the class whose class identifier is CLSID_OEMUI. In the render context, objects are published to the IPrintOemPS or IPrintOemUni interfaces.

The objects that are marked with an asterisk (*) in the following lists are published to the IPrintOemPrintTicketProvider interface.

Unidrv UI Module Publishing Order

  1. IUnknown and *IPrintCoreHelper and IPrintCoreHelperUni

  2. IUnknown and IPrintOemDriverUI

Unidrv Render Module Publishing Order

  1. IUnknown and IPrintCoreHelper and IPrintCoreHelperUni

  2. IUnknown and IPrintOemDriverUni

Pscript5 UI Module Publishing Order

  1. IUnknown and *IPrintCoreHelper and IPrintCoreHelperPS

  2. IUnknown and IPrintCoreUI2

  3. IUnknown and IPrintOemDriverUI

Pscript5 Render Module Publishing Order

  1. IUnknown and IPrintCoreHelper and IPrintCoreHelperPS

  2. IUnknown and IPrintCorePS2