Commit 9fa4a2af authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

setupapi: Add a semi-stub implementation of SetupDiSelectBestCompatDrv().

parent 57c3ebec
...@@ -4325,3 +4325,29 @@ BOOL WINAPI SetupDiEnumDriverInfoA(HDEVINFO devinfo, SP_DEVINFO_DATA *device_dat ...@@ -4325,3 +4325,29 @@ BOOL WINAPI SetupDiEnumDriverInfoA(HDEVINFO devinfo, SP_DEVINFO_DATA *device_dat
sizeof(driver_data->ProviderName), NULL, NULL); sizeof(driver_data->ProviderName), NULL, NULL);
return ret; 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;
}
...@@ -621,17 +621,6 @@ BOOL WINAPI SetupDiLoadClassIcon(const GUID *ClassGuid, HICON *LargeIcon, PINT M ...@@ -621,17 +621,6 @@ BOOL WINAPI SetupDiLoadClassIcon(const GUID *ClassGuid, HICON *LargeIcon, PINT M
} }
/*********************************************************************** /***********************************************************************
* 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.@) * SetupDiSetSelectedDevice (SETUPAPI.@)
*/ */
BOOL WINAPI SetupDiSetSelectedDevice(HDEVINFO SetupDiSetSelectedDevice, PSP_DEVINFO_DATA DeviceInfoData) BOOL WINAPI SetupDiSetSelectedDevice(HDEVINFO SetupDiSetSelectedDevice, PSP_DEVINFO_DATA DeviceInfoData)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment