Using DIFxAPI to Uninstall Driver Packages

Driver Install Frameworks API (DIFxAPI) version 2.1 is a component of Driver Install Frameworks (DIFx) version 2.1. DIFxAPI makes it simpler to create applications that install and uninstall driver packages. DIFxAPI is available starting with Microsoft Windows 2000. DIFxAPI includes the following components:

  • 32-bit components that support x86-based systems.

  • 64-bit components that support x64-based systems.

  • 64-bit component that support Itanium-based systems.

DIFxAPI also supports uninstalling the driver packages that it installs. This topic describes how to uninstall driver packages by using DIFxAPI.

For more information about uninstalling driver and driver packages, see How Devices and Driver Packages are Uninstalled.

Uninstalling the Device

You cannot use DIFxAPI to uninstall a device. To perform this action, you must either use Device Manager or a device installation application that calls SetupAPI functions.

For more information about how to uninstall device nodes (devnodes), see Using Device Manager to Uninstall Devices and Driver Packages and Using SetupAPI to Uninstall Devices and Driver Packages.

Deleting a Driver Package from the Driver Store

To delete the driver package, call the DriverPackageUninstall function with the Flags parameter set to a value of zero.

If this operation is part of a driver update procedure, first call the DriverPackageInstall function to install the updated driver package before you call DriverPackageUninstall.

Deleting the Binary Files of the Installed Driver

To delete the driver package and the associated driver binaries, call the DriverPackageUninstall function with the Flags parameter set to DRIVER_PACKAGE_DELETE_FILES.

Note Starting with Windows 7, the DRIVER_PACKAGE_DELETE_FILES flag is ignored by DriverPackageUninstall. Binary files, which were copied to a system when a driver package was installed, can no longer be deleted by calling this function.