Zebediah Figura : setupapi: Call DIF_DESTROYPRIVATEDATA when deleting a device.
Alexandre Julliard
julliard at winehq.org
Wed May 22 15:52:07 CDT 2019
Module: wine
Branch: master
Commit: afba7d9d93b38e91ef41b4ae3027dca6b468d237
URL: https://source.winehq.org/git/wine.git/?a=commit;h=afba7d9d93b38e91ef41b4ae3027dca6b468d237
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed May 22 11:15:40 2019 -0500
setupapi: Call DIF_DESTROYPRIVATEDATA when deleting a device.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/setupapi/devinst.c | 5 +++++
dlls/setupapi/tests/devinst.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index ea7e74f..2737ee0 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -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);
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 7604062..374c8ca 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -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, "");
More information about the wine-cvs
mailing list