BOOLEAN
SetupDiCallClassInstaller(
IN DI_FUNCTION InstallFunction,
IN HDEVINFO DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData /* optional */
);
SetupDiCallClassInstaller calls the appropriate class installer with the specified installation request (DI_FUNCTION).
Parameters
InstallFunction
Specifies the class installation request to call. Can be one of the following values:
DIF_SELECTDEVICE
Select a driver to be installed for the device. This request uses the SP_SELECTDEVICE_PARAMS structure.
DIF_INSTALLDEVICE
Install the driver for the device.
DIF_PROPERTIES
Display a properties dialog for the device (must specify a particular device in DeviceInfoData).
DIF_REMOVE
Remove the device. This request uses the SP_REMOVEDEVICE_PARAMS structure.
DIF_FIRSTTIMESETUP
Perform first-time class initialization. This request is only used for the global class information associated with the device information set.
DIF_SELECTCLASSDRIVERS
Select drivers for all devices of the class associated with the device information set or element.
DIF_VALIDATECLASSDRIVERS
Ensure that all devices of the class associated with the device information set or element are ready to be installed.
DIF_INSTALLCLASSDRIVERS
Install drivers for all devices of the class associated with the device information set or element.
DIF_CALCDISKSPACE
Compute the amount of disk space required by drivers for the device.
DIF_DESTROYPRIVATEDATA
Destroy any allocated private data stored in the ClassInstallReserved field of the SP_DEVINSTALL_PARAMS structure for the specified device information set or element.
DIF_MOVEDEVICE
Move the device to a new location in the Enum registry branch. This request uses the SP_MOVEDEV_PARAMS structure.
DIF_DETECT
Detect any devices of the class associated with the device information set or element.
DIF_INSTALLWIZARD
Add any pages necessary to the New Device Wizard for the class associated with the device information set or element. This request uses the SP_INSTALLWIZARD_DATA structure.
DIF_DESTROYWIZARDDATA
Destroy any private data allocated by a DIF_INSTALLWIZARD request. This request uses the SP_INSTALLWIZARD_DATA structure.
DIF_PROPERTYCHANGE
The device’s properties are changing. The device is being enabled, disabled, started, stopped, or has had a resource change. This request uses the SP_PROPCHANGE_PARAMS structure.
DIF_INSTALLDEVICEFILES
Install only the driver files for the selected device.
DeviceInfoSet
Supplies a handle to the device information set of the class to install.
DeviceInfoData
Supplies a pointer to an SP_DEVINFO_DATA structure indicating a particular member whose class installer should be called. If this parameter is not specified, the class installer associated with the device information set is called.
Return Value
The function returns TRUE if it is successful. Otherwise it returns FALSE and the logged error can be retrieved with a call to GetLastError.
Comments
This function attempts to load and call the class installer for the class associated with the device information element or set specified. If a class installer does not exist for this class or the class installer returns ERROR_DI_DO_DEFAULT, SetupDiCallClassInstaller calls a default procedure for the specified class installation request.
See Also
SetupDiChangeState, SetupDiInstallClass, SetupDiInstallDevice, SetupDiInstallDriverFiles, SetupDiSelectDevice