IPrintOemDriverUni::DrvWriteSpoolBuf method

The IPrintOemDriverUni::DrvWriteSpoolBuf method is provided by the Unidrv driver so that a rendering plug-in can send printer data to the spooler.

Syntax

HRESULT DrvWriteSpoolBuf(
  PDEVOBJ   pdevobj,
  PVOID     pBuffer,
  DWORD     cbSize,
  OUT DWORD *pdwResult
);

Parameters

pdevobj

Caller-supplied pointer to a DEVOBJ structure.

pBuffer

Caller-supplied pointer to a buffer containing data to be sent to the print spooler.

cbSize

Caller-supplied value representing the size, in bytes, of the buffer pointed to by pBuffer.

pdwResult

Receives a method-supplied value representing the number of bytes sent to the spooler.

Return Value

The method must return one of the following values.

Return code Description
S_OK
The operation succeeded.
E_FAIL
The operation failed.
E_NOTIMPL
The method is not implemented.

Remarks

OEMs use the Unidrv helper function IPrintOemDriverUni::DrvWriteSpoolBuf to send output to the printer. If a print job is terminated by the user, IPrintOemDriverUni::DrvWriteSpoolBuf returns E_FAIL and can no longer be used to send any data to the printer. When this occurs, certain printers must have a clean-up code fragment sent to them, resetting their states before they can start new print jobs. For these printers, IPrintOemDriverUni::DrvWriteAbortBuf can be used to send this code fragment to the printer.

Rendering plug-ins are described in Customizing Microsoft's Printer Drivers.

Requirements

   
Target Platform Desktop
Header prcomoem.h (include Prcomoem.h)