DrvSendPage function

A printer graphics DLL's DrvSendPage function is called by GDI when it has finished drawing a physical page, so the driver can send the page to the printer.

Syntax


BOOL DrvSendPage(
  _In_ SURFOBJ *pso
);

Parameters

pso [in]

Caller-supplied pointer to a SURFOBJ structure that describes the drawing surface.

Return value

If the operation succeeds, the function should return TRUE. Otherwise, it should call the Win32 SetLastError function to set an error code, and then return FALSE.

Remarks

GDI calls DrvSendPage each time it has finished drawing a physical page's image on the drawing surface. The function is responsible for calling EngWritePrinter to send the image to the printer, and for performing end-of-page operations, such as ejecting the page.

Printer graphics DLLs using GDI-managed surfaces are typically implemented so that for pages that are banded, the image for each band is sent to the printer by the driver's DrvNextBand function.

Additionally, if a printer graphics DLL is using a device-managed surface, the DrvSendPage function typically only needs to perform end-of-page operations, because the image is sent to the printer as it is drawn.

If there is a potential for this function to take a long time to execute, it should call EngCheckAbort every five seconds. If EngCheckAbort returns TRUE, DrvSendPage should terminate its operation and return FALSE.

Requirements

Target platform

Desktop

Header

Winddi.h (include Winddi.h)

See also

DrvStartPage
DrvNextBand
EngCheckAbort
EngWritePrinter

 

 

Send comments about this topic to Microsoft

Show: