Index   Commented   Search   About

Overview
Group
Quick Info

Windows NT
Yes
Win95
Yes
Win32s
No
Import Library
winspool.lib
Header File
winspool.h
Unicode
No
Platform Notes
None

ReadPrinter

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
);

Parameters

hPrinter

Identifies the printer for which to retrieve data.

pBuf

Points to an array of bytes that receives the printer data.

cbBuf

Specifies the size, in bytes, of the buffer to which pBuf points.

pNoBytesRead

Points to a variable that receives the number of bytes of data copied into the array to which pBuf points.

Return Values

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.

Remarks

ReadPrinter
returns an error if the device or the printer is not bidirectional.

See Also

OpenPrinter

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun