1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use shared::ntdef::{ULONG, USHORT};
use um::winioctl::{FILE_ANY_ACCESS, METHOD_BUFFERED};
STRUCT!{struct DEVICE_DESCRIPTOR {
usVendorId: USHORT,
usProductId: USHORT,
usBcdDevice: USHORT,
usLanguageId: USHORT,
}}
pub type PDEVICE_DESCRIPTOR = *mut DEVICE_DESCRIPTOR;
pub const FILE_DEVICE_USB_SCAN: ULONG = 0x8000;
pub const IOCTL_INDEX: ULONG = 0x0800;
pub const IOCTL_GET_USB_DESCRIPTOR: ULONG
= CTL_CODE!(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 8, METHOD_BUFFERED, FILE_ANY_ACCESS);