DEVICE_INFO


typedef struct {
    UINT cbSize;
    struct _DEVICE_INFO FAR *lpNextDi;
    char szDescription[LINE_LEN];
    DWORD dnDevnode;
    HKEY hRegKey;
    char szRegSubkey[MAX_DEVNODE_ID_LEN];
    char szClassName[MAX_CLASS_NAME_LEN];
    DWORD Flags;
    HWND hwndParent;
    LPDRIVER_NODE lpCompatDrvList;
    LPDRIVER_NODE lpClassDrvList;
    LPDRIVER_NODE lpSelectedDriver;
    ATOM atDriverPath;
    ATOM atTempInfFile;
    HINSTANCE hinstClassInstaller;
    HINSTANCE hinstClassPropProvidor;
    HINSTANCE hinstDevicePropProvidor;
    HINSTANCE hinstBasicPropProvidor;
    FARPROC fpClassInstaller;
    FARPROC fpClassEnumPropPages;
    FARPROC fpDeviceEnumPropPages;
    FARPROC fpEnumBasicProperties;
    DWORD dwSetupReserved;
    DWORD dwClassInstallReserved;
    GENCALLBACKPROC gicpGenInstallCallBack;
    LPARAM gicplParam;
    UINT InfType;
    HINSTANCE hinstPrivateProblemHandler;
    FARPROC fpPrivateProblemHandler;
    LPARAM lpClassInstallParams;
    struct _DEVICE_INFO FAR *lpdiChildList;
    DWORD dwFlagsEx;
    LPDRIVER_INFO lpCompatDrvInfoList;
    LPDRIVER_INFO lpClassDrvInfoList;
} DEVICE_INFO;

This is the basic data structure for most Device installation APIs. A DEVICE_INFO represents a device that is being installed on the system, or an installed device that is being modified in some way.

cbSize

Size of the DEVICE_INFO struct.

*lpNextDi

Pointer to the next DEVICE_INFO struct in a linked list.

szDescription[LINE_LEN]

Buffer containing the description of the device.

dnDevnode

If set, this contains the address of the DevNode associated with the device.

hRegKey

An opened registry key that contains the device's registry subkey. This is usually HKEY_LOCAL_MACHINE.

szRegSubkey[MAX_DEVNODE_ID_LEN]

Buffer containing the device's hardware registry subkey. This is key is rooted in hRegKey, and is ususally some place in the \ENUM branch.

szClassName[MAX_CLASS_NAME_LEN]

Buffer containing the device's class name.

Flags

Flags for controlling installation and U/I functions. Some flags can be set prior to calling device installer APIs, and other are set automatically during the processing of some APIs.

DI_SHOWOEM

Set if OEM disk support should be allowed

DI_SHOWCOMPAT

Will be set if only a compatible driver list is being displayed by DiSelectDevice.

DI_SHOWCLASS

Will be set if only a Class driver list is is being displayed by DiSelectDevice.

DI_SHOWALL

Will be set if both a compatible driver list and a class driver list are being shown by DiSelectDevice.

DI_NOVCP

Set if no VCP (Virtual Copy Procedure) is desired during DiInstallDevice.

DI_DIDCOMPAT

Will be set if DiBuildCompatDrvList has been done, and lpCompatDrvList points to this device's compatible driver list.

DI_DIDCLASS

Will be set if DiBuildClassDrvList has been done, and lpClassDrvList points to this device's class driver list.

DI_AUTOASSIGNRES

Unused.

DI_NEEDRESTART

Will be set if the device requires a restart of Windows after installation or a state change.

DI_NEEDREBOOT

Will be set if the device requires a reboot of the machine after installation or a state change.

DI_NOBROWSE

Set to diable browsing when selecting an OEM disk path.

DI_MULTMFGS

Will be set if a class driver list, or class info list contains multiple manufactures.

DI_DISABLED

Unused.

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 Device Manager's U/I.

DI_INF_IS_SORTED

Set if the INF containing drivers for this device is in sorted order.

DI_ENUMSINGLEINF

Set if DiBuildCompatDrvList and DiBuildlassDrvList should only search the INF file specificed by atDriverPath.

DI_DONOTCALLCONFIGMG

Set if the configuration manager should not be called during DiInstallDevice.

DI_INSTALLDISABLED

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

DI_CLASSONLY

Set if this DEVICE_INFO struct contains only a class name.

DI_CLASSINSTALLPARAMS

Set if the lpClassIntallParams field points to a class install parameter block.

DI_NODI_DEFAULTACTION

Set if DiCallClassInstaller should not perform any default action if the class installer return ERR_DI_DO_DEFAULT, or there is not class installer.

DI_QUIETINSTALL

Set if device install API should be as silent as possible using default choices whereever possible.

DI_NOFILECOPY

Set if DiInstallDevice should skip file copying.

DI_FORCECOPY

Set if DiInstallDevice should always copy file, even if they are 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 DiSelectDevice.

DI_OVERRIDE_INFFLAGS

Unused.

DI_PROPS_NOCHANGEUSAGE

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

DI_NOSELECTICONS

Set if no small icons should be used during DiSelectDevice.

DI_NOWRITE_IDS

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


hwndParent

Window handle that will own U/I dialogs related to this device.

lpCompatDrvList

Pointer to a linked list of DRIVER_NODES representing the compatible drivers for this device.

lpClassDrvList

Pointer to a linked list of DRIVER_NODES representing all drivers of this device's class.

lpSelectedDriver

Pointer to a single DRIVER_NODE that has been selected as the driver for this device.

atDriverPath

Global ATOM containing the path to this device's INF file. This is set only of the driver came from an OEM INF file. This will be 0 if the INF is a standard Windows INF file.

atTempInfFile

Global ATOM containing the name of a temporary INF file for this device's drivers. This is set if the drivers came from an old style INF file and have been converted.

hinstClassInstaller

Class installer module instance.

hinstClassPropProvidor

Class Property Providor module instance.

hinstDevicePropProvidor

Device Property Providor module instance.

hinstBasicPropProvidor

Basic Property Providor module instance.

fpClassInstaller

Procedure address of class install function.

fpClassEnumPropPages

Procedure address of the Class property provider page enumeration function.

fpDeviceEnumPropPages

Procedure address of the Device property provider page enumeration function.

fpEnumBasicProperties

Procedure address of the Basic device property provider page enumeration function.

dwSetupReserved

Reserved for use by Setup.

dwClassInstallReserved

Reserved for use by Class Installers.

gicpGenInstallCallBack

Procedure address of a GenInstall call back function. This would be set if the class installer wanted to handle GenInstall callbacks during DiInstallDevice.

gicplParam

lParam for the GenInstall Callback.

InfType

The type of INF file being used. This will be INFTYPE_TEXT or INFTYPE_EXECUTABLE.

hinstPrivateProblemHandler

Module handle for the device's private problem procedure.

fpPrivateProblemHandler

Procedure address of the device's private problem handler.

lpClassInstallParams

Pointer to a class install parameter block. Class installer parameters are specific to the class install functions.

*lpdiChildList

Pointer to a linked list of DRIVER_INFO structs representing children of this device.

dwFlagsEx

Additional control flags.

DI_FLAGSEX_USEOLDINFSEARCH

Set if INF Search functions should not use indexed searching.

DI_FLAGSEX_AUTOSELECTRANK0

Set if DiSelectDevice should automatically select rank 0 match drivers.

DI_FLAGSEX_CI_FAILED

Will be set internally if there was a failure to load or call a class installer.

DI_FLAGSEX_FILTERCLASSES

If set, DiBuildClassDrvList will check for Class inclusion filters. This means devices will not be included in the list, if their class is marked as a NoInstallClass class.

DI_FLAGSEX_SETFAILEDINSTALL

If set, then if DiInstallDevice installs a NULL driver, it will also set the FAILEDINSTALL config flag

DI_FLAGSEX_DEVICECHANGE

If set, the device manager will rebuild its tree of devices after the device property sheet is closed.

DI_FLAGSEX_ALWAYSWRITEIDS

If set, and the flag, DI_NOWRITE_ID is clear (i.e., that flag takes higher precedence) then always write Hardware and Compat ids, even if they already exist

DI_FLAGSEX_ALLOWEXCLUDEDDRVS

If set, DiSelectDevice will display drivers that have the Exlude From Select state


lpCompatDrvInfoList

Pointer to a linked list of DRIVER_INFO structs that are compatible with this device.

lpClassDrvInfoList

Pointer to a linked list of DRIVER_INFO structs representing all drivers for this device's class.