The EngWritePrinter function allows printer graphics DLLs to send a data stream to printer hardware.
BOOL
EngWritePrinter(
IN HANDLE hPrinter,
IN LPVOID pBuf,
IN DWORD cbBuf,
OUT LPDWORD pcWritten
);
If the operation succeeds, the function returns TRUE; otherwise it returns FALSE.
Declared in winddi.h. Include winddi.h.
Printer graphics DLLs call EngWritePrinter to send data streams (either control sequences or image data) to the print spooler, which in turn sends the data to the printer hardware by calling the appropriate print monitor. The function returns after the spooler receives the data.
The buffer pointed to by pBuf cannot be in user memory; that is, pBuf cannot point to memory allocated by EngCreateBitmap with the BMF_USERMEM flag set or by EngAllocUserMem.
For additional information about calling EngWritePrinter, see Rendering a Print Job.