You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define the CTL_CODE macro and the IoGetCurrentIrpStackLocation function.
Move constants and macros (such as FILE_DEVICE_UNKNOWN, METHOD_BUFFERED, and others) from this crate and windows-rs to a shared crate. Motivation: This enables the definition of IOCTL codes in a shared crate that can be linked to both the driver and application sides.
Change the types of some constants, like IRP_MJ_* to usize, and IO_NO_INCREMENT to CCHAR. It would also be beneficial to define TRUE and FALSE as pub const TRUE: BOOLEAN = 1; and pub const FALSE: BOOLEAN = 0; respectively, or even better, eliminate all BOOLEAN types from the API and replace them with the plain Rust bool, although I understand that this might be nearly impossible. Motivation: To eliminate unnecessary type casting where it logically should not exist.
Do something with __bindgen_anon_*. Motivation: The statement (*irp).IoStatus.__bindgen_anon_1.Status = status; looks very awkward, and it's also challenging to locate the needed field in more complex cases like (*irp).Tail.Overlay.__bindgen_anon_2.__bindgen_anon_1.CurrentStackLocation.
In general, it would be beneficial if constants in constants.rs had types from types.rs.
The text was updated successfully, but these errors were encountered:
Define the
CTL_CODE
macro and theIoGetCurrentIrpStackLocation
function.Move constants and macros (such as
FILE_DEVICE_UNKNOWN
,METHOD_BUFFERED
, and others) from this crate and windows-rs to a shared crate.Motivation: This enables the definition of IOCTL codes in a shared crate that can be linked to both the driver and application sides.
Change the types of some constants, like
IRP_MJ_*
tousize
, andIO_NO_INCREMENT
toCCHAR
. It would also be beneficial to defineTRUE
andFALSE
aspub const TRUE: BOOLEAN = 1;
andpub const FALSE: BOOLEAN = 0;
respectively, or even better, eliminate allBOOLEAN
types from the API and replace them with the plain Rust bool, although I understand that this might be nearly impossible.Motivation: To eliminate unnecessary type casting where it logically should not exist.
Do something with
__bindgen_anon_*
.Motivation: The statement
(*irp).IoStatus.__bindgen_anon_1.Status = status;
looks very awkward, and it's also challenging to locate the needed field in more complex cases like(*irp).Tail.Overlay.__bindgen_anon_2.__bindgen_anon_1.CurrentStackLocation
.In general, it would be beneficial if constants in
constants.rs
had types fromtypes.rs
.The text was updated successfully, but these errors were encountered: