Skip to content

driver: fix duplicate HID_DEVICE_ATTRIBUTES definition and enum constants #47

Description

@phaedrus1992

Two issues in ioctl.rs:

  1. Duplicate HID_DEVICE_ATTRIBUTES struct (lines 20-27): A private struct is defined that shadows wdk_sys export. This is an ABI hazard if hand-declared fields diverge from the real HID struct.

  2. WDF enum constants as raw i32 (lib.rs lines 26-28): WDF_DEFAULT and WDF_IO_QUEUE_DISPATCH_PARALLEL are both hardcoded to 0, losing type safety. Should either use proper enum values from wdk-sys or create typed constants.

Options:

  • Delete private HID_DEVICE_ATTRIBUTES and use wdk_sys binding
  • Rename to HidDeviceAttributes (Rust convention) if local definition is needed
  • Create properly-typed WDF constants instead of raw i32 values

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions