1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms 6 use shared::ntdef::{ULONG, USHORT}; 7 use um::winioctl::{FILE_ANY_ACCESS, METHOD_BUFFERED}; 8 //98 9 STRUCT!{struct DEVICE_DESCRIPTOR { 10 usVendorId: USHORT, 11 usProductId: USHORT, 12 usBcdDevice: USHORT, 13 usLanguageId: USHORT, 14 }} 15 pub type PDEVICE_DESCRIPTOR = *mut DEVICE_DESCRIPTOR; 16 //132 17 pub const FILE_DEVICE_USB_SCAN: ULONG = 0x8000; 18 pub const IOCTL_INDEX: ULONG = 0x0800; 19 //143 20 pub const IOCTL_GET_USB_DESCRIPTOR: ULONG 21 = CTL_CODE!(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 8, METHOD_BUFFERED, FILE_ANY_ACCESS); 22