SP_CLASSINSTALL_HEADER

typedef struct _SP_CLASSINSTALL_HEADER {
    DWORD cbSize;
    DI_FUNCTION InstallFunction;
} SP_CLASSINSTALL_HEADER, *PSP_CLASSINSTALL_HEADER;
 

SP_CLASSINSTALL_HEADER must be the first member of any class install parameter structure. It defines the class installation request of the install parameter structure.

Members
cbSize
Contains the size, in bytes, of the SP_CLASSINSTALL_HEADER structure.
InstallFunction
Specifies the class installation request for a class install parameter structure. Can be one of the following:
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.
Comments

The InstallFunction member must be set to the function code corresponding to the type of structure and cbSize must be set to the size of the SP_CLASSINSTALL_HEADER structure. For example:

SP_REMOVEDEVICE_PARAMS RemoveDeviceParams;
RemoveDeviceParams.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);
RemoveDeviceParams.ClassInstallHeader.InstallFunction = DIF_REMOVE;
 
See Also

SetupDiCallClassInstaller, SetupDiGetClassInstallParams, SetupDiSetClassInstallParams, SP_INSTALLWIZARD_DATA, SP_MOVEDEV_PARAMS, SP_PROPCHANGE_PARAMS, SP_REMOVEDEVICE_PARAMS, SP_SELECTDEVICE_PARAMS