Expand Minimize

EngWritePrinter function

The EngWritePrinter function allows printer graphics DLLs to send a data stream to printer hardware.

Syntax


BOOL EngWritePrinter(
  _In_   HANDLE hPrinter,
  _In_   LPVOID pBuf,
  _In_   DWORD cbBuf,
  _Out_  LPDWORD pcWritten
);

Parameters

hPrinter [in]

Caller-supplied handle to the printer. This should be the handle received as the DrvEnablePDEV function's hDriver parameter value.

pBuf [in]

Caller-supplied pointer to a buffer containing a byte stream to be sent to the printer.

cbBuf [in]

Specifies the caller-supplied number of bytes contained in the buffer pointed to by pBuf.

pcWritten [out]

Caller-supplied pointer to a DWORD location that receives the number of bytes actually written to the printer.

Return value

If the operation succeeds, the function returns TRUE; otherwise it returns FALSE.

Remarks

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.

Requirements

Version

Available in Windows 2000 and later versions of the Windows operating systems.

Header

Winddi.h (include Winddi.h)

Library

Win32k.lib

DLL

Win32k.sys

See also

DrvEnablePDEV
EngCreateBitmap
EngAllocUserMem

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft