IPrintOemPS2::WritePrinter method (prcomoem.h)

The IPrintOemPS2::WritePrinter method, if supported, enables a rendering plug-in to capture all output data generated by a Postscript driver. If this method is not supported, the output data would otherwise be sent to the spooler in a call to the spooler's WritePrinter API (described in the Microsoft Windows SDK documentation).

Syntax

HRESULT WritePrinter(
  PDEVOBJ pdevobj,
  PVOID   pBuf,
  DWORD   cbBuffer,
  PDWORD  pcbWritten
);

Parameters

pdevobj

Pointer to a DEVOBJ structure.

pBuf

Pointer to the first byte of an array of bytes that contains the output data generated by the PostScript driver.

cbBuffer

Specifies the size, in bytes, of the array pointed to by pBuf.

pcbWritten

Pointer to a DWORD value that receives the number of bytes of data that the plug-in sent to the spooler's WritePrinter function (described in the Windows SDK documentation).

Return value

If successful, this method returns S_OK. Otherwise, this method should return an appropriate value in the returned HRESULT.

Remarks

At DrvEnablePDEV time, the PostScript driver calls this method with pBuf and pdevobj set to NULL, and cbBuf set to 0, to detect whether the plug-in implements this function. The plug-in should return S_OK to indicate it implements this method, and should return E_NOTIMPL otherwise.

This method should report the number of bytes written to the spooler's WritePrinter function in pcbWritten. A value of zero carries no special meaning; errors must be reported through the returned HRESULT.

Requirements

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