ReadPrinter

  BOOL ReadPrinter(hPrinter, pBuf, cbBuf, pNoBytesRead)    
  HANDLE hPrinter;    
  LPVOID pBuf;    
  DWORD cbBuf;    
  LPDWORD pNoBytesRead;    

This function reads data back from the Printer. This function can return an error if the device or the printer is not bi-directional.

Parameters

hPrinter

Indicates the open Printer handle that this function is to be performed upon. This Handle is obtained with the OpenPrinter API.

pBuf

Points to a buffer which will be filled with data returned by this function

cbBuf

Specifies the size of the buffer pointed to by pBuf

pNoBytesRead

Points to a variable which will be filled with the amount of data returned in pBuf

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.