DeletePrinterDriver

  BOOL DeletePrinterDriver(pName, pEnvironment, pDriverName)    
  LPTSTR pName;    
  LPTSTR pEnvironment;    
  LPTSTR pDriverName;    

This function removes the driver from the list of currently supported drivers. This function does not delete any files, but merely removes the DriverName from the list that would be returned from the EnumPrinterDrivers function.

Parameters

pName

Points to a null-terminated string specifying the server that the driver is to be deleted from. If NULL, then the printer driver will be removed locally.

pEnvironment

A pointer to a null-terminated string that specifies the environment on which the driver is to be deleted. ie “W32X86” or “W32MIPS”. If this value is NULL, then this means the current environment.

pDriverName

A pointer to a null-terminated string that specifies the name of the driver to delete. This name is typically retrieved from the EnumPrinterDrivers function at Info Level 1.

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.