SP_DEVINSTALL_PARAMS

typedef struct _SP_DEVINSTALL_PARAMS {

DWORD cbSize;

DWORD Flags;

DWORD FlagsEx;

HWND hwndParent;

PSP_FILE_CALLBACK InstallMsgHandler;

PVOID InstallMsgHandlerContext;

HSPFILEQ FileQueue;

DWORD ClassInstallReserved;

DWORD Reserved;

TCHAR DriverPath[MAX_PATH];

} SP_DEVINSTALL_PARAMS, *PSP_DEVINSTALL_PARAMS;

SP_DEVINSTALL_PARAMS defines device install parameters associated with a particular device information element or globally with a device information set.

Members

cbSize

Contains the size, in bytes, of the SP_DEVINSTALL_PARAMS structure.

Flags

Flags that control installation and user interface functions. Some flags can be set prior to calling the device installation functions while others are set automatically during the processing of some functions. Flags can be a combination of the following values:

DI_SHOWOEM

Set to allow support for OEM disks.

DI_NOVCP

Set to disable creation of a new copy queue. Use the caller-supplied copy queue.

DI_DIDCOMPAT

Will be set if SetupDiBuildDriverInfoList has already built a list of compatible drivers for this device. If this list has already been built, it contains all the driver information and this flag is always set.

DI_DIDCLASS

Will be set if SetupDiBuildDriverInfoList has already built a list of class drivers for this device. If this list has already been built, it contains all the driver information and this flag is always set.

DI_NEEDRESTART

Will be set by SetupDiInstallDevice if the device requires that the machine be rebooted after device installation or a device state change.

DI_NEEDREBOOT

For Windows NT, this is the same as DI_NEEDRESTART.

DI_NOBROWSE

Set to disable browsing when the user is selecting an OEM disk path.

DI_MULTMFGS

Will be set by SetupDiBuildDriverInfoList if a class driver list contains drivers provided by multiple manufacturers.

DI_GENERALPAGE_ADDED

Set by a property page provider if a general properties page has been added to the device's property sheet.

DI_RESOURCEPAGE_ADDED

Set by a property page provider if a resource properties page has been added to the device's property sheet.

DI_PROPERTIES_CHANGE

Set if a device's properties have been changed and require an update of the installer's user interface.

DI_INF_IS_SORTED

Set to indicate that the sorting order from the INF file should be used.

DI_ENUMSINGLEINF

Set if SetupDiBuildDriverInfoList should only search the specified INF file.

DI_DONOTCALLCONFIGMG

Set if the Configuration Manager should not be called to modify the registry hardware tree during the execution of certain device installation functions (for example, SetupDiInstallDevice).

DI_INSTALLDISABLED

Set if the device should be installed in a disabled state by default.

DI_COMPAT_FROM_CLASS

Set to force SetupDiBuildDriverInfoList to build a device's list of compatible drivers from its class driver list instead of the INF file.

DI_CLASSINSTALLPARAMS

Set to use the Class Install parameters.

DI_NODI_DEFAULTACTION

Set if SetupDiCallClassInstaller should not perform any default action if the class installer returns ERR_DI_DO_DEFAULT or there is not a class installer.

DI_QUIETINSTALL

Set if the device installer functions should be as silent as possible and use default choices wherever possible.

DI_NOFILECOPY

Set if SetupDiInstallDevice should skip file copying.

DI_FORCECOPY

Set if SetupDiInstallDevice should always copy files, even if they are already present on the system.

DI_DRIVERPAGE_ADDED

Set by a property page provider if a driver properties page has been added to the device's property sheet.

DI_USECI_SELECTSTRINGS

Set if class installer-provided strings should be used during SetupDiSelectDevice.

DI_PROPS_NOCHANGEUSAGE

Set if there should be no Enable/Disable capability on the device's general property page.

DI_NOSELECTICONS

Set if small icons should not be used in select device dialogs.

DI_NOWRITE_IDS

Set if SetupDiInstallDevice should not write the device's hardware and compatible IDs to the registry.

FlagsEx

Flags that provide extended control over installation and user interface functions. Some flags can be set prior to calling the device installer functions while others are set automatically during the processing of some functions. Flags can be a combination of the following values:

DI_FLAGSEX_AUTOSELECTRANK0

Set if SetupDiSelectDevice should automatically select all rank 0 drivers.

DI_FLAGSEX_CI_FAILED

Is set internally if a class installer failed to load or start.

DI_FLAGSEX_DIDINFOLIST

A class driver list has been built.

DI_FLAGSEX_DIDCOMPATINFO

A compatible driver list has been built.

DI_FLAGSEX_FILTERCLASSES

If set, SetupDiBuildClassInfoList will check for class inclusion filters. This means that a device will not be included in the class list if its class is marked as NoInstallClass.

DI_FLAGSEX_SETFAILEDINSTALL

If set, the FAILEDINSTALL flag will be set when SetupDiInstallDevice installs a NULL driver.

DI_FLAGSEX_DEVICECHANGE

If set, any user interface that displays a list of devices will rebuild its list of devices after the device property sheet is closed.

DI_FLAGSEX_ALWAYSWRITEIDS

If set and the DI_NOWRITE_IDS flag is clear, always write hardware and compatible IDs to the registry.

DI_FLAGSEX_ALLOWEXCLUDEDDRVS

If set, SetupDiSelectDevice displays drivers that have the Exclude From Select state.

DI_FLAGSEX_USECLASSFORCOMPAT

Filter INF files on the device's class when building a list of compatible drivers. If a device's class is known, setting this flag can decrease the time required to build a list of compatible drivers.

DI_FLAGSEX_OLDINF_IN_CLASSLIST

Search legacy INF files when building a class driver list. This flag is valid for Windows NT only.

DI_FLAGSEX_NO_DRVREG_MODIFY

Do not process the AddReg and DelReg items for the device's software (driver) key.

hwndParent

Window handle that will own the user interface dialogs related to this device.

InstallMsgHandler

Callback used to handle events during file copying.

InstallMsgHandlerContext

Private data used by the InstallMsgHandler callback.

FileQueue

A handle to a caller-supplied file queue where file operations should be queued but not committed.

DriverPath

Specifies the path to this device's INF file. This is a non-empty string only if the driver was installed from an OEM INF file.

See Also

SetupDiBuildClassInfoList, SetupDiBuildDriverInfoList, SetupDiCallClassInstaller, SetupDiGetDeviceInstallParams, SetupDiInstallDevice, SetupDiSelectDevice, SetupDiSetDeviceInstallParams