Commit afba7d9d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

setupapi: Call DIF_DESTROYPRIVATEDATA when deleting a device.

parent fce26e60
......@@ -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, "");
......
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