IPrintOemPS2::GetPDEVAdjustment method enables a plug-in to override specific PDEV settings.
HRESULT GetPDEVAdjustment( PDEVOBJ pdevobj, DWORD dwAdjustType, PVOID pBuf, DWORD cbBuffer, [out] BOOL *pbAdjustmentDone );
Pointer to a DEVOBJ structure.
Specifies the type of adjustment asked for. The following flags are currently supported:
Adjust the paper margin setting that is reported in the PDEV. See the PDEV_ADJUST_PAPER_MARGIN structure.
Enable or disable the Hostfont support feature. See the PDEV_HOSTFONT_ENABLED structure.
Enable or disable color output for monochrome and color printers. See the PDEV_USE_TRUE_COLOR structure.
Pointer to a structure that contains the planned settings that are used if there is no change. These structures are listed in the preceding table. The plug-in can overwrite the settings in the relevant structure.
Specifies the size, in bytes, of the structure pointed to by pBuf.
- pbAdjustmentDone [out]
Pointer to a memory location that the plug-in sets to TRUE when it actually changes a value in the buffer. This may be used by the driver for optimizations.
IPrintOemPS2::GetPDEVAdjustment method should return S_OK if it recognizes the adjustment type, and S_FALSE if it does not. If the method fails, it should return E_FAIL. The chain of plug-ins is called until either S_OK or a failure code other than E_NOTIMPL is returned. That is, the chain of plug-ins is called until the first plug-in that is capable of handling the adjustment is found.
This function is available in Windows XP and later.
Currently, the Pscript5 driver calls
IPrintOemPS2::GetPDEVAdjustment to adjust the paper margin setting, as reported in the PDEV, to enable or disable the Hostfont feature, or to turn PostScript color output on or off.