setupapi: Add a semi-stub implementation of SetupDiSelectBestCompatDrv().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
57c3ebec7c
commit
9fa4a2af1c
@ -4325,3 +4325,29 @@ BOOL WINAPI SetupDiEnumDriverInfoA(HDEVINFO devinfo, SP_DEVINFO_DATA *device_dat
|
||||
sizeof(driver_data->ProviderName), NULL, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetupDiSelectBestCompatDrv (SETUPAPI.@)
|
||||
*/
|
||||
BOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
|
||||
{
|
||||
struct device *device;
|
||||
|
||||
TRACE("devinfo %p, device_data %p.\n", devinfo, device_data);
|
||||
|
||||
if (!(device = get_device(devinfo, device_data)))
|
||||
return FALSE;
|
||||
|
||||
if (!device->driver_count)
|
||||
{
|
||||
ERR("No compatible drivers were enumerated for device %s.\n", debugstr_w(device->instanceId));
|
||||
SetLastError(ERROR_NO_COMPAT_DRIVERS);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
WARN("Semi-stub, selecting the first available driver.\n");
|
||||
|
||||
device->selected_driver = &device->drivers[0];
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -620,17 +620,6 @@ BOOL WINAPI SetupDiLoadClassIcon(const GUID *ClassGuid, HICON *LargeIcon, PINT M
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetupDiSelectBestCompatDrv (SETUPAPI.@)
|
||||
*/
|
||||
BOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData)
|
||||
{
|
||||
FIXME(": stub %p, %p\n", DeviceInfoSet, DeviceInfoData);
|
||||
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetupDiSetSelectedDevice (SETUPAPI.@)
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user