BOOL AddPrinterDriver(pName, Level, pDriverInfo) | |||
LPTSTR pName; | |||
DWORD Level; | |||
LPBYTE pDriverInfo; |
The AddPrinterDriver function adds to the list of supported Printer Drivers. It assumes that all the necessary files have been copied to the Printer Driver Directory that was returned from the GetPrinterDriverDirectory function. The AddPrinterDriver function simply links the Configuration, Data, and Driver files with a Model Name. Any number of Models can be supported by the same files.
pName
Points to a null-terminated string specifying the Server that the Driver is to be added to. If NULL, then the Driver is installed locally.
Level
This value must be 2.
pDriverInfo
This points to a DRIVER_INFO_2 structure.
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.
GetPrinterDriverDirectory, EnumPrinterDrivers