The ReadPrinter function retrieves data from the specified printer.
BOOL ReadPrinter(
HANDLE hPrinter, |
// handle of printer object |
LPVOID pBuf, |
// address of array of bytes that receives data |
DWORD cbBuf, |
// size, in bytes, of array |
LPDWORD pNoBytesRead |
// address of variable with number of bytes retrieved |
); |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
ReadPrinter returns an error if the device or the printer is not bidirectional.