EngGetPrinter

BOOL EngGetPrinter(

    HANDLE hPrinter,

    DWORD dwLevel,

    LPBYTE pPrinter,

    DWORD cbBuf,

    LPDWORD pcbNeeded

   );

EngGetPrinter retrieves information about the specified printer.

Parameters

hPrinter
Identifies the printer for which data should be retrieved. This is the handle that is passed as the hDriver parameter of DrvEnablePDEV.
dwLevel
Specifies the version of the structure to which pPrinter points. This parameter can have any of the following values:

Value

Structure Returned Via pPrinter

1

PRINTER_INFO_1

2

PRINTER_INFO_2

3

PRINTER_INFO_3

4

PRINTER_INFO_4

5

PRINTER_INFO_5

pPrinter
Pointer to the data space in which the printer information structure, identified by dwLevel, is loaded.
cbBuf
Specifies the size, in bytes, of the data space pointed to by pPrinter.
pcbNeeded
Return address in which the number of bytes copied is returned if the function succeeds, or in which the number of required bytes is returned if cbBuf is too small.

Return Value

EngGetPrinter returns TRUE upon success; otherwise, it logs an error and returns FALSE. To get error information, call EngGetLastError.

See Also

DrvEnablePDEV