SetPrinterData

  DWORD SetPrinterData(hPrinter, pValueName, Type, pData, cbData)    
  HANDLE hPrinter;    
  LPTSTR pValueName;    
  DWORD Type;    
  LPBYTE pData;    
  DWORD cbData;    

This function sets the configuration information for the printer. This can be retrieved with the GetPrinter function.

Parameters

hPrinter

Indicates the open printer handle that this function is to be performed upon. This Handle is obtained with the OpenPrinter function.

pValueName

Indicates the name of the data to be retrieved.

Type

Unused.

pData

Points to a buffer which contains the configuration information.

cbData

Specifies the size of the buffer pointed to by pData.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.