[−][src]Function win_kernel_driver::io_control_code
pub const fn io_control_code(
device_type: u32,
function: u32,
method: Method,
access: Access
) -> u32
Creates an IOCTL code
Arguments
device_type
- The device type is a 32bit integer. It must match the kernel driver you're loading.function
- The function code you want to send to the driver. Consult your driver's documentation for the available codes.DriverBuildermethod
- The IO method to useaccess
- The access level (read/write/any) to use
Example
let device = 0x00000022; // FILE_DEVICE_UNKNOWN let function = 0x800; // Some function code defined by the driver // Generate an IO control code for a buffered read to the driver. let ioctl = io_control_code(device, function, Method.BUFFERED, Access.READ);