Summary
On 0.61.2 it was defined as:
#[repr(C)]
#[cfg(all(feature = "Wdk_Storage_FileSystem", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))]
#[derive(Clone, Copy)]
pub struct IO_STACK_LOCATION_0_16 {
pub OutputBufferLength: u32,
pub InputBufferLength: u32,
pub IoControlCode: u32,
pub Type3InputBuffer: *mut core::ffi::c_void,
}
Which has wrong layout due to InputBufferLength and IoControlCode need to have pointer alignment:
struct {
ULONG OutputBufferLength;
ULONG POINTER_ALIGNMENT InputBufferLength;
ULONG POINTER_ALIGNMENT IoControlCode;
PVOID Type3InputBuffer;
} DeviceIoControl;
Crate manifest
Crate code
Summary
On 0.61.2 it was defined as:
Which has wrong layout due to
InputBufferLengthandIoControlCodeneed to have pointer alignment:Crate manifest
Crate code