Expand Minimize

EngGetPrinter function

The EngGetPrinter function retrieves information about the specified printer.

Syntax


BOOL EngGetPrinter(
  _In_       HANDLE hPrinter,
  _In_       DWORD dwLevel,
  _Out_opt_  LPBYTE pPrinter,
  _In_       DWORD cbBuf,
  _Out_      LPDWORD pcbNeeded
);

Parameters

hPrinter [in]

Handle to the printer for which data should be retrieved. This is the handle that is passed as the hDriver parameter of DrvEnablePDEV.

dwLevel [in]

Specifies the version of the structure to which pPrinter points. This parameter can have any of the following values:

ValueStructure Returned via pPrinter

1

PRINTER_INFO_1

2

PRINTER_INFO_2

3

PRINTER_INFO_3

4

PRINTER_INFO_4

5

PRINTER_INFO_5

 

pPrinter [out, optional]

Pointer to the memory buffer in which the printer information structure, identified by dwLevel, is loaded.

cbBuf [in]

Specifies the size, in bytes, of the memory buffer pointed to by pPrinter.

pcbNeeded [out]

Pointer to a memory location that receives the number of bytes copied if the function succeeds, or the number of required bytes 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.

Remarks

The PRINTER_INFO_X structures are defined in the Microsoft Windows SDK documentation.

Requirements

Version

Available in Windows 2000 and later versions of the Windows operating systems.

Header

Winddi.h (include Winddi.h)

Library

Win32k.lib

DLL

Win32k.sys

See also

DrvEnablePDEV

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft