Accessing Plug-In Interfaces from Printer Drivers

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.

If a UI plug-in or rendering plug-in is installed, the printer driver (Unidrv or Pscript5) uses the following calling sequence to obtain access to the plug-in's IPrintOemUI, IPrintOemUI2, IPrintOemUni, IPrintOemUni2, IPrintOemUni3, IPrintOemPS, or IPrintOemPS2 COM interface:

  1. The driver calls LoadLibrary to load the plug-in DLL, which causes a call to the plug-in's DllMain function.

  2. The driver calls the plug-in's DllGetClassObject function, which returns a pointer to the plug-in's IClassFactory interface.

  3. The driver calls the IClassFactory interface's CreateInstance method, specifying an interface identifier of IID_IUnknown, which causes the method to create an instance of the plug-in's IPrintOemUI, IPrintOemUI2, IPrintOemUni, IPrintOemUni2, IPrintOemUni3, IPrintOemPS, or IPrintOemPS2 interface and return a pointer to the instance's IUnknown interface.

  4. The driver calls the IUnknown interface's QueryInterface method to determine which version of the IPrintOemUI, IPrintOemUI2, IPrintOemUni, IPrintOemUni2, IPrintOemUni3, IPrintOemPS, or IPrintOemPS2 interface is supported by the plug-in and to receive a pointer to the supported interface.

  5. The driver calls the plug-in interface's PublishDriverInterface method to make the driver's IPrintOemDriverUI, IPrintCoreUI2, IPrintOemDriverUni, IPrintOemDriverPS, or IPrintCorePS2 interface available to the plug-in.

  6. If the plug-in has implemented the IPrintOemUni interface, the driver calls IPrintOemUni::GetImplementedMethod to determine which interface methods have been implemented. Similarly, if the plug-in has implemented the IPrintOemUni2 interface, the driver calls IPrintOemUni2::GetImplementedMethod for the same purpose.