DeletePrinterDataEx

[This is preliminary documentation and subject to change.]

The DeletePrinterDataEx function deletes a specified value from the configuration data for a printer. A printer's configuration data consists of a set of named and typed values stored in a hierarchy of registry keys. The function deletes a specified value under a specified key.

DWORD DeletePrinterDataEx(
  HANDLE hPrinter,       // handle to printer object
  LPCTSTR pKeyName,      // name of the registry key
  LPCTSTR pValueName     // name of the value
);
 

Parameters

hPrinter
Handle to the printer for which the function deletes a value. Use the OpenPrinter function to retrieve a printer handle.
pKeyName
Pointer to a null-terminated string that specifies the key containing the value to delete. Use the backslash ( \ ) character as a delimiter to specify a path that has one or more subkeys.

If pKeyName is NULL or an empty string, DeletePrinterDataEx returns ERROR_INVALID_PARAMETER.

pValueName
Pointer to a null-terminated string that specifies the name of the value to delete.

Return Values

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a Win32 error value.

QuickInfo

  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.

See Also

Printing and Print Spooler Overview, Printing and Print Spooler Functions, DeletePrinterKey, EnumPrinterDataEx, EnumPrinterKey, GetPrinterDataEx, OpenPrinter, SetPrinterDataEx