[This is preliminary documentation and subject to change.]
The EnumPrinterDataEx function enumerates all value names and data for a specified printer and key.
Printer data is stored in the registry. While enumerating printer data, do not call registry functions that might change the data.
DWORD EnumPrinterDataEx( HANDLE hPrinter, // handle to printer object LPCTSTR pKeyName, // name of registry key LPBYTE pEnumValues, // receives array of PRINTER_ENUM_VALUES
DWORD cbEnumValues, // size, in bytes, of the pEnumValues buffer
LPDWORD pcbEnumValues, // receives number of bytes of data
// retrieved in the pEnumValues buffer
LPDWORD pnEnumValues // receives number of enumerated values
);
If pKeyName is NULL or an empty string, EnumPrinterDataEx returns ERROR_INVALID_PARAMETER.
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a Win32 error value.
EnumPrinterDataEx retrieves printer configuration data set by the SetPrinterDataEx and SetPrinterData functions.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winspool.h.
Import Library: Use winspool.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Printing and Print Spooler Overview, Printing and Print Spooler Functions, DeletePrinterDataEx, EnumPrinterKey, GetPrinterDataEx, OpenPrinter, PRINTER_ENUM_VALUES, SetPrinterData, SetPrinterDataEx