DIF_ALLOW_INSTALL

A DIF_ALLOW_INSTALL request asks the installers for a device whether Windows can proceed to install the device.

When Sent

After selecting a driver for the device but before installing the device.

Who Handles

Class Co-installer

Can handle

Device Co-installer

Should not handle

Class Installer

Can handle

 

Installer Input

DeviceInfoSet

Supplies a handle to the device information set that contains the device.

DeviceInfoData

Supplies a pointer to an SP_DEVINFO_DATA structure that identifies the device in the device information set.

Device Installation Parameters

There are device installation parameters (SP_DEVINSTALL_PARAMS) associated with the DeviceInfoData.

Class Installation Parameters

None

Installer Output

None

Installer Return Value

A co-installer can return NO_ERROR or a Win32 error. A co-installer should not return ERROR_DI_POSTPROCESSING_REQUIRED for this DIF request.

A class installer typically returns ERROR_DI_DO_DEFAULT or a Win32 error code.

Typical Win32 error codes for this DIF request include ERROR_DI_DONT_INSTALL and ERROR_NON_WINDOWS_NT_DRIVER.

Note  Class installers and co-installers should not freturn ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION since that causes the device installation to fail. If the device installation requires user interaction, class installers and co-installers should support either a finish-install wizard or, starting with Windows Vista, finish-install action.

Default DIF Code Handler

None

Installer Operation

In response to a DIF_ALLOW_INSTALL request an installer confirms whether Windows can install the device.

An installer can fail this request if it determines that the selected driver is incorrect (for example, if the driver is a Windows 9x-only driver that will not work correctly on NT-based operating systems) or if it determines that a selected driver is known to have bugs.

An installer might fail this request if the DI_QUIETINSTALL flag is set in the device installation parameters and the installer has to display UI during device installation. However, this failure is rare because an installer can typically supply any UI pages in response to the DIF_NEWDEVICEWIZARD_FINISHINSTALL request. In that case, UI does not prevent the installer from succeeding a DIF_ALLOW_INSTALL request for which the quiet flag is set. However, if an installer cannot limit its UI to the finish-install case, the installer must fail this DIF request if the DI_QUIETINSTALL flag is set. An installer might have this restriction, for example, if it calls vendor-supplied code that displays UI.

If an installer fails this DIF request, Windows stops the installation.

If an installer fails this DIF request and DI_QUIETINSTALL is not set in the device installation parameters, the installer should display a dialog box with a message that explains why the device is not being installed.

For more information about DIF codes, see Handling DIF Codes.

Requirements

Version

Supported in Microsoft Windows 2000 and later versions of Windows.

Header

Setupapi.h (include Setupapi.h)

See also

SP_DEVINFO_DATA
SP_DEVINSTALL_PARAMS

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft