mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 07:56:59 +00:00
[KBDCLASS] Set the device interface state on device start and device remove
This commit is contained in:
parent
cc16769179
commit
5414600e1e
1 changed files with 4 additions and 0 deletions
|
@ -873,6 +873,8 @@ ClassPnp(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DeviceExtension->FileHandle = NULL;
|
DeviceExtension->FileHandle = NULL;
|
||||||
|
if (DeviceExtension->InterfaceName.Length != 0)
|
||||||
|
IoSetDeviceInterfaceState(&DeviceExtension->InterfaceName, TRUE);
|
||||||
Irp->IoStatus.Status = Status;
|
Irp->IoStatus.Status = Status;
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -887,6 +889,8 @@ ClassPnp(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_REMOVE_DEVICE:
|
case IRP_MN_REMOVE_DEVICE:
|
||||||
|
if (DeviceExtension->InterfaceName.Length != 0)
|
||||||
|
IoSetDeviceInterfaceState(&DeviceExtension->InterfaceName, FALSE);
|
||||||
if (DeviceExtension->FileHandle)
|
if (DeviceExtension->FileHandle)
|
||||||
{
|
{
|
||||||
ZwClose(DeviceExtension->FileHandle);
|
ZwClose(DeviceExtension->FileHandle);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue