2.4.2.5 Installation Requests

The device installer issues an installation request with a call to SetupDiCallClassInstaller and the appropriate class installer is called to carry out the installation task.

A DIF_SELECTDEVICE request directs the installer to choose a driver for a new device or a new driver for an existing device. The installer either makes the selection, prompts the user to make the selection, or directs the class installer to prompt the user (the default action).

A DIF_INSTALLDEVICE request directs the installer to install the given driver. The installer either installs the driver or directs the class installer to do it (the default action). In some cases, an installer can carry out pre-processing, such as copying support drivers and prompting for user input, before requesting the default action.

A DIF_PROPERTIES request directs the installer to display the properties sheet for the selected device. This request is sent when the user clicks on the Properties button. The installer can display the property sheet or direct the class installer to display the default property sheet (the default action).

A DIF_REMOVE request directs the installer to remove the specified device. The installer typically removes the corresponding registry entries for the device.

A DIF_FIRSTTIMESETUP request directs the installer to carry out any class-specific installation tasks that need to be complete during initial installation of the operating system.

A DIF_CALCDISKSPACE request directs the installer to calculate the disk space requirements for installing a driver for the specified device. By default action, the class installer calculates the disk requirements based on the contents of the INF file.

A DIF_DESTROYPRIVATEDATA request directs the installer to free any memory or resources it has allocated and stored in the private data portion of the SP_DEVINSTALL_PARAMS structure.

A set of requests (DIF_SELECTCLASSDRIVERS, DIF_VALIDATECLASSDRIVERS, and DIF_INSTALLCLASSDRIVERS) can be used to install a multiple set of drivers instead of a single driver. An installer should process these requests only if it intends to carry out the complete installation on its own.

A DIF_SELECTCLASSDRIVERS request directs the installer to select the driver or drivers to install for the given class; DIF_VALIDATECLASSDRIVERS directs the installer to validate all settings for the given devices; and DIF_INSTALLCLASSDRIVERS directs the installer to install the selected and validated drivers. The default action for these requests is to do nothing.

A DIF_INSTALLWIZARD request directs the installer to add pages to the New Device Install wizard for the class associated with a device that is being installed and the DIF_DESTROYWIZARDDATA request directs the installer to destroy any private data allocated by the DIF_INSTALLWIZARD request.

A DIF_MOVEDEVICE request directs the installer to move the device to a new location in the registry’s Enum branch.

A DIF_DETECT request directs the installer to detect any devices of the class associated with a particular HDEVINFO handle and adds the devices to the device information set.