Juan Lang : setupapi: When freeing an interface, delete it from the registry if its device is a phantom.
Alexandre Julliard
julliard at winehq.org
Mon Sep 24 08:08:05 CDT 2007
Module: wine
Branch: master
Commit: 7de0f1d583ec4a910db198becbb82f11639129d5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7de0f1d583ec4a910db198becbb82f11639129d5
Author: Juan Lang <juan.lang at gmail.com>
Date: Fri Sep 21 17:08:51 2007 -0700
setupapi: When freeing an interface, delete it from the registry if its device is a phantom.
---
dlls/setupapi/devinst.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 9fe76e2..a5356e5 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -152,6 +152,15 @@ static void SETUPDI_FreeInterfaceInstances(struct InterfaceInstances *instances)
struct InterfaceInfo *ifaceInfo =
(struct InterfaceInfo *)instances->instances[i].Reserved;
+ if (ifaceInfo->device && ifaceInfo->device->Reserved)
+ {
+ struct DeviceInfo *devInfo =
+ (struct DeviceInfo *)ifaceInfo->device->Reserved;
+
+ if (devInfo->phantom)
+ SetupDiDeleteDeviceInterfaceRegKey(devInfo->set,
+ &instances->instances[i], 0);
+ }
HeapFree(GetProcessHeap(), 0, ifaceInfo->referenceString);
HeapFree(GetProcessHeap(), 0, ifaceInfo->symbolicLink);
}
More information about the wine-cvs
mailing list