forderud / IntelliMouseDriver

Filter drivers for Microsoft Pro IntelliMouse that implements safety checks and exposes a WMI interface
MIT License
1 stars 1 forks source link

Private/bryan/periodic timer #45

Closed ManOnTheMountainTech closed 7 months ago

ManOnTheMountainTech commented 7 months ago
  1. Defer to device arrival using IoRegisterPlugPlayNotification.
  2. Deadlock scenario if we try to open the device within a PnP IRP, so need to use a timer or work item. Using timer code for now.
  3. Opening a device is dependent on ZwCreateFile(). There is always a chance it can fail, so we need a restart mechanism.
  4. The synchronous base SetBlack() code broke for some reason. Since SetBlackAsync() works, let's validate that we can open the device reliably and use what works.
  5. I left the create handler in case we need to serialize it in order to make WdfIoTargetOpen more reliable. But if validation shows that we don't need to synchronize it then we can get rid of it.
forderud commented 7 months ago

This pull request introduces 580 new lines of code, which makes it huge. It's also not mergable due to conflicts. Would it be possible for you to rebase on top of master and clean it up and cut down the number of changes, so that it becomes easier to review and merge?