DeviceExtension->ReadIsPending = FALSE;
DeviceExtension->InputCount = 0;
DeviceExtension->PortData = ExAllocatePool(NonPagedPool, DeviceExtension->DriverExtension->DataQueueSize * sizeof(KEYBOARD_INPUT_DATA));
- Fdo->Flags |= DO_POWER_PAGABLE;
+ Fdo->Flags |= DO_POWER_PAGABLE | DO_BUFFERED_IO;
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
/* Add entry entry to HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\[DeviceBaseName] */
/* A read request is waiting for input, so go straight to it */
/* FIXME: use SEH */
RtlCopyMemory(
- Irp->MdlAddress ? MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority) : Irp->UserBuffer,
+ Irp->MdlAddress ? MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority) : Irp->AssociatedIrp.SystemBuffer,
DataStart,
sizeof(KEYBOARD_INPUT_DATA));
/* FIXME: use SEH */
RtlCopyMemory(
- Irp->MdlAddress ? MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority) : Irp->UserBuffer,
+ Irp->AssociatedIrp.SystemBuffer,
DeviceExtension->PortData - DeviceExtension->InputCount,
sizeof(KEYBOARD_INPUT_DATA));
}
#endif
- if (DeviceNode->ServiceName.Length == 0)
- /* We have a NULL driver for this device. We can't really do
- * something with it, so state it is started... */
- IopDeviceNodeSetFlag(DeviceNode, DNF_STARTED);
-
if (!IopDeviceNodeHasFlag(DeviceNode, DNF_DISABLED) &&
!IopDeviceNodeHasFlag(DeviceNode, DNF_ADDED) &&
!IopDeviceNodeHasFlag(DeviceNode, DNF_STARTED))