[This is preliminary documentation and subject to change.]
The EnumPrinterKey function enumerates the subkeys of a specified key for a specified printer.
Printer data is stored in the registry. While enumerating printer data, do not call registry functions that might change the data.
DWORD EnumPrinterKey(
HANDLE hPrinter, // handle to printer object
LPCTSTR pKeyName, // name of registry key
LPTSTR pSubkey, // receives array of subkey names
DWORD cbSubkey, // size, in bytes, of the pSubkey buffer
LPDWORD pcbSubkey // receives number of bytes of data
// retrieved in the pSubkey buffer
);
If pKeyName is an empty string (""), EnumPrinterKey enumerates the top-level key for the printer. If pKeyName is NULL, EnumPrinterKey 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. If pKeyName does not exist, the return value is ERROR_FILE_NOT_FOUND.
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, GetPrinterDataEx, OpenPrinter, SetPrinterDataEx