winapi_ui_automation/shared/
usbscan.rs

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
6use shared::ntdef::{ULONG, USHORT};
7use um::winioctl::{FILE_ANY_ACCESS, METHOD_BUFFERED};
8//98
9STRUCT!{struct DEVICE_DESCRIPTOR {
10    usVendorId: USHORT,
11    usProductId: USHORT,
12    usBcdDevice: USHORT,
13    usLanguageId: USHORT,
14}}
15pub type PDEVICE_DESCRIPTOR = *mut DEVICE_DESCRIPTOR;
16//132
17pub const FILE_DEVICE_USB_SCAN: ULONG = 0x8000;
18pub const IOCTL_INDEX: ULONG = 0x0800;
19//143
20pub const IOCTL_GET_USB_DESCRIPTOR: ULONG
21    = CTL_CODE!(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 8, METHOD_BUFFERED, FILE_ANY_ACCESS);