BOOLEAN
SetupDiInstallDevice(
IN HDEVINFO DeviceInfoSet,
IN OUT PSP_DEVINFO_DATA DeviceInfoData
);
SetupDiInstallDevice is the default handler for the DIF_INSTALLDEVICE class installation request. It installs a device by calling the SetupInstallFromInfSection function for the Install section of the selected driver's INF file.
Parameters
DeviceInfoSet
Supplies a handle to the device information set for which a driver is to be installed.
DeviceInfoData
Supplies a pointer to an SP_DEVINFO_DATA structure for which a driver is to be installed. This is an IN OUT parameter because the DevInst field of the structure can be updated with a new handle value upon return.
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
After a device is installed by the SetupDiInstallDevice function, the device is started if possible. If, however, the DI_NEEDRESTART, DI_NEEDREBOOT, or DI_DONOTCALLCONFIGMG flag in the SP_DEVINSTALL_PARAMS structure is set, the device is not started.
See Also