IPrintOemUni3::SetBandSize method (prcomoem.h)
The IPrintOemUni3::SetBandSize
method can be used with Unidrv-supported printers to specify the desired band size on the printed output.
Syntax
HRESULT SetBandSize(
[in] PDEVOBJ pdevobj,
[in] INT iFormat,
[in] DWORD dwPageWidthBytes,
[in] DWORD dwPageHeight,
[in] DWORD dwMaxHeight,
[in] PDWORD pdwRequiredHeight
);
Parameters
[in] pdevobj
A caller-supplied pointer to a DEVOBJ structure.
[in] iFormat
An integer value that specifies the format of the bitmap in terms of the number of bits of color information per pixel that are required. This parameter can be one of the following values.
[in] dwPageWidthBytes
A Unidrv-supplied value that specifies the width of the printing area, in bytes.
[in] dwPageHeight
A Unidrv-supplied value that specifies the height of the printing area, in pixels.
[in] dwMaxHeight
A Unidrv-supplied value that specifies the maximum allowable height of the printing area, in pixels.
[in] pdwRequiredHeight
A caller-supplied pointer to a DWORD that contains the height of the printing area, in pixels, required by the rendering plug-in.
Return value
The method must return one of the following values:
Return code | Description |
---|---|
|
The operation succeeded. See Note. |
|
The operation failed. See Note. |
|
Unidrv should compute the banding size. |
Remarks
This method is available in Windows Vista and later.
This method is used by a rendering plug-in to specify band size using the plug-in's own calculations, rather than using Unidrv's band size calculations.
You can disable banding operations by Unidrv by setting the dwPageHeight value to *pdwRequiredHeight, but you should consider the performance effect of the height value that the rendering plug-in requests. For rendering, Unidrv needs at least the amount of memory that is calculated by multiplying dwPageWidthBytes by *pdwRequiredHeight. If the rendering plug-in supports the IPrintOemUni::DriverDMS method and that method returns "S_OK", IPrintOemUni3::SetBandSize
is not called.
If this method is defined and the printer's generic printer description (GPD) file indicates that preanalysis is disabled (the GPD file includes "*PreAnalysisOptions: 0"), Unidrv calls this method to calculate band size. For information about the PreAnalysisOptions attribute, see Preanalysis Infrastructure.
If the rendering plug-in supports IPrintOemUni::DriverDMS and that method returns S_OK, IPrintOemUni3::SetBandSize
is not called.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | prcomoem.h (include Prcomoem.h) |