Table of Contents
Updated
Sometimes your computer may generate an error code indicating dif_selectbestcompatdrv error. There can be several reasons for this problem.
The dif_selectbestcompatdrv request allows the installer to select the best driver from the list of compatible drivers in the Facts and Methods element about the device.
If Sent
When the flight system is preparing to install a PnP star device or is doing a good change of pilot process on a PnP device.
This DIF application is commonly used in PnP organization. When a device is manually created, Windows sends a DIF_SELECTDEVICE request.
Who Heals?
Installing a class together |
Will handle it |
Install device together |
Optional |
Class Installer |
Will handle it |
Installer Href = “”> Input
DeviceInfoSet
Provides work with a set of device information generated from a device.
DeviceInfoData
Returns a pointer to a structure type SP_DEVINFO_DATA that identifies the machines in the device information record.
device installation options
The installation device criteria ( SP_DEVINSTALL_PARAMS ) is assigned by DeviceInfoData.
Installer Output
device settings
The installer can change the settings for installing components. However, they usually do not do this when processing this DIF request.
DeviceInfoData
As a side effect, the installer may change the list of drivers assigned by DeviceInfoData, in particular SP_DRVINSTALL_PARAMS.
Return Value From Installer
The co-installer may return NO_ERROR, ERROR_DI_POSTPROCESSING_REQUIRED, or a Win32 error code.
If the class A installer successfully processes this request and then SetupDiCallClassInstaller needs to convert the default handler, the class installer will return ERROR_DI_DO_DEFAULT.
If the class setter successfully handles this fact, includingrequest, and directly calls the default owner, the class installer should return NO_ERROR, in addition to SetupDiCallClassInstaller will no longer call the normal handler as follows.
Note A class installer can call the default handler directly, but the note installer should never attempt to override these default handler operations.
For more reporting on handler invocation, check the default Calling standard DIF code handlers .
If the class installer encounters an error, the installer should clear the appropriate Win32 error code and SetupDiCallClassInstaller will not call the lag handler after that.
Standard DIF Code Manager
Installer
The installer processes DIF requests to help you select the appropriate driver for your PnP device. The installer usually responds to this DIF request in one of the following ways:
-
Do nothing. For
Unless the contractor has specific selection requirements, it will not respond to this DIF request. The class installer returns ERROR_DI_DO_DEFAULTand even the co-installer returns NO_ERROR.
-
Change settings for only one or more drivers in the driver list. Example
for the installer, an important driver can be excluded from consideration for a device by simply marking it DNF_BAD_DRIVER. The installer changes the switch settings as follows:
-
Get information about the first show driver by navigating to SetupDiEnumDriverInfo and SetupDiGetDriverInstallParams . If everything is ok, change the parameter driver and apply the general change by calling SetupDiSetDriverInstallParams .
If the driver is likely to be the worst case, the driver will be installed to 0xFFFF or higher in the carrier install settings. For more information, see How Windows selects drivers .
-
Repeat the previous step yourself until you have processed only all the drivers in the list. Be sure to increase the MemberIndex parameter to SetupDiEnumDriverInfo , as shown in the reference page for the corresponding function.
After the class installer changes the driver’s layout, it returns ERROR_DI_DO_DEFAULT. If the jointThe ith installer changes the list of drivers, it must do this during preprocessing and return NO_ERROR.
-
-
Choose the best driver for your device.
This is a less common action, but the installer can choose the best driver for the device. Such an installer will check the golf driver details, select a driver for each, and refer to SetupDiSetSelectedDriver to configure the driver. Once the entrepreneur specifies the selected driver, NO_ERROR is returned.
If the co-installer chooses a driver for the computer, it should probably be post-processed.
Requirements
Version |
Supported width = “50%”> |
UpdatedAre you tired of your computer running slow? Annoyed by frustrating error messages? ASR Pro is the solution for you! Our recommended tool will quickly diagnose and repair Windows issues while dramatically increasing system performance. So don't wait any longer, download ASR Pro today! Title |
Setupapi.h (including Setupapi.h) |
See Also Request
This is deprecated in Windows 10 version 1703 (Redstone 2). This reminder is no longer called on newer versions of Windows.
I have published a driver for USB devices. it is currently working well.
but now at me there was a special problem with its installation.
Some USB 2.0 devices I support may have multiple interfaces.
eg: USB / VID_XXXX / PID_0145 Firwmare 1 => little-known interface
USB / VID_XXXX / PID_0145 with Firwmare 2 => USB_MASS_STORAGE and own interface
To install devices, I wrote CoClassInstaller and therefore ClassInstaller.
managed to use dif_code to help Windows choose the most compatible driver.
This works for some operating systems (Windows XP, Vista, Seven 32/64),
but on a specific computer (Seven 64) DIF_SELECTBESTCOMPATDRV does not appear in the setupapi.dev.log.
Does anyone have any clues as to where you might be due to this behavior?
If necessary, I can provide another piece of the setupapi.dev.log file.