Bewerken

Delen via


DIF_INSTALLINTERFACES

A DIF_INSTALLINTERFACES request allows an installer to participate in the registration of the device interfaces for a device.

When Sent

After registering device co-installers but before completing device installation.

Who Handles

Class Co-installer

Can handle

Device Co-installer

Can 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

Device Installation Parameters
An installer might modify the device installation parameters, but not usually for this DIF request.

Installer Return Value

A co-installer can return NO_ERROR, ERROR_DI_POSTPROCESSING_REQUIRED, or a Win32 error code.

If a class installer successfully handles this request and SetupDiCallClassInstaller should subsequently call the default handler, the class installer returns ERROR_DI_DO_DEFAULT.

If the class installer successfully handles this request, including directly calling the default handler, the class installer should return NO_ERROR and SetupDiCallClassInstaller will not subsequently call the default handler again.

Note  The class installer can directly call the default handler, but the class installer should never attempt to supersede the operations of the default handler.

For more information about calling the default handler, see Calling Default DIF Code Handlers.

If the class installer encounters an error, the installer should return an appropriate Win32 error code and SetupDiCallClassInstaller will not subsequently call the default handler.

Default DIF Code Handler

SetupDiInstallDeviceInterfaces

Installer Operation

In response to a DIF_INSTALLINTERFACES request an installer might register a device interface programmatically instead of having the interface registered through the INF file. Typically, vendor-supplied installers do not handle this DIF request.

Unless the DI_NOFILECOPY flag is set, an installer that handles this DIF request should copy files that are required for the device interface(s).

If the DI_NOFILECOPY flag is clear but the DI_NOVCP flag is set, the installer must enqueue any file operations to the supplied file queue but must not commit the queue.

If an installer registers a device interface, a kernel-mode component for the device (for example, a driver) must call IoSetDeviceInterfaceState to enable the interface.

If the installer returns a Win32 error code, Windows stops the installation.

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

SetupDiInstallDeviceInterfaces

SP_DEVINFO_DATA

SP_DEVINSTALL_PARAMS