DrvUpgradePrinter

BOOL DrvUpgradePrinter(

    DWORD Level,

    LPBYTE pDriverUpgradeInfo

   );

DrvUpgradePrinter upgrades a printer’s registry device settings.

Parameters

Level
Specifies the version number of the structure to which pDriverUpgradeInfo points. Currently this value is always 1.
pDriverUpgradeInfo
Pointer to a DRIVER_UPGRADE_INFO_1 structure containing the information required by the driver to perform the upgrade.

Return Value

If DrvUpgradePrinter is successful, the return value is TRUE. Otherwise, DrvUpgradePrinter sets a last-error code and returns FALSE.

Comments

The spooler calls DrvUpgradePrinter for every printer when a new printer driver is copied onto the system. This occurs when a system is upgraded from one operating system release to the next, or when a user updates a printer driver by calling the Win32 AddPrinterDriver function. DrvUpgradePrinter should update the registry with the new device settings for the specified printer.