]> xenbits.xensource.com Git - pvdrivers/win/xencons.git/commitdiff
Handle DBT_DEVICEREMOVEPENDING and DBT_DEVICEREMOVECOMPLETE
authorOwen Smith <owen.smith@citrix.com>
Mon, 11 Sep 2017 20:08:29 +0000 (13:08 -0700)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 11 Sep 2017 20:08:29 +0000 (13:08 -0700)
When surprise removed, DBT_DEVICEQUERYREMOVE is not called, and
the handles opened by the service need closing before the driver
gets the IRP_MN_REMOVE_DEVICE Irp.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
src/monitor/monitor.c

index 89f5f5668c4c547e198b9ac397664d993476571a..08ae0f28d1d94dd00cf62d73673af23ed501d5e0 100644 (file)
@@ -1122,6 +1122,8 @@ MonitorCtrlHandlerEx(
             break;
 
         case DBT_DEVICEQUERYREMOVE:
+        case DBT_DEVICEREMOVEPENDING:
+        case DBT_DEVICEREMOVECOMPLETE:
             if (Header->dbch_devicetype == DBT_DEVTYP_HANDLE) {
                 PDEV_BROADCAST_HANDLE Device = EventData;