setupapi: Call DIF_DESTROYPRIVATEDATA when deleting a device.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fce26e60cc
commit
afba7d9d93
|
@ -724,6 +724,11 @@ static void remove_device(struct device *device)
|
|||
static void delete_device(struct device *device)
|
||||
{
|
||||
struct device_iface *iface, *next;
|
||||
SP_DEVINFO_DATA device_data;
|
||||
|
||||
device_data.cbSize = sizeof(device_data);
|
||||
copy_device_data(&device_data, device);
|
||||
SetupDiCallClassInstaller(DIF_DESTROYPRIVATEDATA, device->set, &device_data);
|
||||
|
||||
if (device->phantom)
|
||||
remove_device(device);
|
||||
|
|
|
@ -2420,8 +2420,8 @@ static void test_class_installer(void)
|
|||
|
||||
SetupDiDestroyDeviceInfoList(set);
|
||||
|
||||
todo_wine ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count);
|
||||
todo_wine ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message);
|
||||
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count);
|
||||
ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message);
|
||||
*coinst_callback_count = 0;
|
||||
|
||||
/* Test returning an error. */
|
||||
|
@ -2498,8 +2498,8 @@ static void test_class_installer(void)
|
|||
|
||||
SetupDiDestroyDeviceInfoList(set);
|
||||
|
||||
todo_wine ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count);
|
||||
todo_wine ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message);
|
||||
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count);
|
||||
ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message);
|
||||
*coinst_callback_count = 0;
|
||||
|
||||
res = RegDeleteKeyA(class_key, "");
|
||||
|
|
Loading…
Reference in New Issue