IPrintOemUIMXDC::AdjustDPI method

The IPrintOemUIMXDC::AdjustDPI method enables an XPS filter pipeline driver to use UnidrvUI.dll or PS5UI.dll to support configuration of image resolution.


  HANDLE         hPrinter,
  DWORD          cbDevMode,
  const PDEVMODE pDevMode,
  DWORD          cbOEMDM,
  const PVOID    pOEMDM,
  PLONG          pDPI



A handle to the printer that is currently being queried.


The size of the DEVMODE structure, including appended data.


A pointer to the DEVMODE structure that contains the current device settings.


The number of bytes in the vendor-provided section of the DEVMODE structure.


A pointer to the data that is contained in the vendor portion of the DEVMODE structure that pDevMode points to.


A pointer to the current resolution, in dots per inch (DPI), assuming square pixels. If this parameter is configured, its returned value must be a positive integer.

Return Value

AdjustDPI returns S_OK if the method succeeds. Otherwise, this method should return E_NOTIMPL if the plug-in does not support the method, or any appropriate failure value if the plug-in cannot complete the operation. For more information, see the following Remarks section.


The pDPI parameter is IN OUT. All other parameters for this function are input only.

If the plug-in cannot complete the operation, it should return an appropriate failure HRESULT, which causes the current print job to fail.


Minimum supported client Available with Windows Vista and later versions of Unidrvui.dll and Ps5ui.dll, which are redistributable. This method is also available for XPSDrv drivers in Microsoft Windows XP if you have installed the XPS Essentials Pack.
Target Platform Desktop
Header prcomoem.h (include Prcomoem.h)