ReactOS 0.4.15-dev-7674-gc0b4db1
usbscan.h
Go to the documentation of this file.
1/*
2 * usbscan.h
3 *
4 * USB scanner definitions
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23#pragma once
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#if (NTDDI_VERSION >= NTDDI_WIN2K)
30
31#pragma pack(push,8)
32
33#ifndef MAX_NUM_PIPES
34#define MAX_NUM_PIPES 8
35#endif
36
37#define BULKIN_FLAG 0x80
38
39typedef struct _DRV_VERSION {
44
45typedef struct _IO_BLOCK {
51
52typedef struct _IO_BLOCK_EX {
61
62typedef struct _CHANNEL_INFO {
67
68typedef enum _PIPE_TYPE {
74
80
81typedef struct _DEVICE_DESCRIPTOR {
87
88typedef enum _RAW_PIPE_TYPE {
94
101
106
107#if (NTDDI_VERSION >= NTDDI_WINXP)
108typedef struct _USBSCAN_TIMEOUT {
113#endif
114
115#define FILE_DEVICE_USB_SCAN 0x8000
116#define IOCTL_INDEX 0x0800
117
118#define IOCTL_GET_VERSION \
119 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 0, METHOD_BUFFERED,FILE_ANY_ACCESS)
120
121#define IOCTL_CANCEL_IO \
122 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 1, METHOD_BUFFERED,FILE_ANY_ACCESS)
123
124#define IOCTL_WAIT_ON_DEVICE_EVENT \
125 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 2, METHOD_BUFFERED,FILE_ANY_ACCESS)
126
127#define IOCTL_READ_REGISTERS \
128 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 3, METHOD_BUFFERED,FILE_ANY_ACCESS)
129
130#define IOCTL_WRITE_REGISTERS \
131 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
132
133#define IOCTL_GET_CHANNEL_ALIGN_RQST \
134 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 5, METHOD_BUFFERED,FILE_ANY_ACCESS)
135
136#define IOCTL_GET_DEVICE_DESCRIPTOR \
137 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 6, METHOD_BUFFERED,FILE_ANY_ACCESS)
138
139#define IOCTL_RESET_PIPE \
140 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 7, METHOD_BUFFERED,FILE_ANY_ACCESS)
141
142#define IOCTL_GET_USB_DESCRIPTOR \
143 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 8, METHOD_BUFFERED,FILE_ANY_ACCESS)
144
145#define IOCTL_SEND_USB_REQUEST \
146 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 9, METHOD_BUFFERED,FILE_ANY_ACCESS)
147
148#define IOCTL_GET_PIPE_CONFIGURATION \
149 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 10,METHOD_BUFFERED,FILE_ANY_ACCESS)
150
151#if (NTDDI_VERSION >= NTDDI_WINXP)
152#define IOCTL_SET_TIMEOUT \
153 CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 11,METHOD_BUFFERED,FILE_ANY_ACCESS)
154#endif
155
156#pragma pack(pop)
157
158#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
159
160#ifdef __cplusplus
161}
162#endif
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
unsigned short USHORT
Definition: pedump.c:61
_Out_ ULONG uWriteDataAlignment
Definition: usbscan.h:65
_Out_ ULONG EventChannelSize
Definition: usbscan.h:63
_Out_ ULONG uReadDataAlignment
Definition: usbscan.h:64
_Out_ USHORT usBcdDevice
Definition: usbscan.h:84
_Out_ USHORT usVendorId
Definition: usbscan.h:82
_Out_ USHORT usLanguageId
Definition: usbscan.h:85
_Out_ USHORT usProductId
Definition: usbscan.h:83
_Out_ ULONG major
Definition: usbscan.h:40
_Out_ ULONG internal
Definition: usbscan.h:42
_Out_ ULONG minor
Definition: usbscan.h:41
_In_ ULONG uOffset
Definition: usbscan.h:53
_In_ UCHAR fTransferDirectionIn
Definition: usbscan.h:59
_In_ ULONG uIndex
Definition: usbscan.h:56
_In_ UCHAR bRequest
Definition: usbscan.h:57
_Inout_updates_bytes_(uLength) PUCHAR pbyData
_In_ ULONG uLength
Definition: usbscan.h:54
_In_ UCHAR bmRequestType
Definition: usbscan.h:58
_In_ ULONG uIndex
Definition: usbscan.h:49
_In_ ULONG uOffset
Definition: usbscan.h:46
_Inout_updates_bytes_(uLength) PUCHAR pbyData
_In_ ULONG uLength
Definition: usbscan.h:47
_In_ UCHAR DescriptorType
Definition: usbscan.h:76
_In_ UCHAR Index
Definition: usbscan.h:77
_In_ USHORT LanguageId
Definition: usbscan.h:78
_Out_ ULONG NumberOfPipes
Definition: usbscan.h:103
_Out_writes_(NumberOfPipes) USBSCAN_PIPE_INFORMATION PipeInfo[MAX_NUM_PIPES]
RAW_PIPE_TYPE PipeType
Definition: usbscan.h:99
IN ULONG TimeoutEvent
Definition: usbscan.h:111
IN ULONG TimeoutWrite
Definition: usbscan.h:110
IN ULONG TimeoutRead
Definition: usbscan.h:109
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
struct _DEVICE_DESCRIPTOR * PDEVICE_DESCRIPTOR
struct _USBSCAN_GET_DESCRIPTOR * PUSBSCAN_GET_DESCRIPTOR
struct _USBSCAN_PIPE_INFORMATION USBSCAN_PIPE_INFORMATION
struct _IO_BLOCK * PIO_BLOCK
_RAW_PIPE_TYPE
Definition: usbscan.h:88
@ USBSCAN_PIPE_INTERRUPT
Definition: usbscan.h:92
@ USBSCAN_PIPE_BULK
Definition: usbscan.h:91
@ USBSCAN_PIPE_ISOCHRONOUS
Definition: usbscan.h:90
@ USBSCAN_PIPE_CONTROL
Definition: usbscan.h:89
struct _IO_BLOCK_EX IO_BLOCK_EX
_PIPE_TYPE
Definition: usbscan.h:68
@ ALL_PIPE
Definition: usbscan.h:72
@ READ_DATA_PIPE
Definition: usbscan.h:70
@ WRITE_DATA_PIPE
Definition: usbscan.h:71
@ EVENT_PIPE
Definition: usbscan.h:69
enum _RAW_PIPE_TYPE RAW_PIPE_TYPE
struct _DRV_VERSION DRV_VERSION
struct _USBSCAN_PIPE_INFORMATION * PUSBSCAN_PIPE_INFORMATION
struct _USBSCAN_PIPE_CONFIGURATION * PUSBSCAN_PIPE_CONFIGURATION
enum _PIPE_TYPE PIPE_TYPE
#define MAX_NUM_PIPES
Definition: usbscan.h:34
struct _DEVICE_DESCRIPTOR DEVICE_DESCRIPTOR
struct _USBSCAN_TIMEOUT * PUSBSCAN_TIMEOUT
struct _USBSCAN_PIPE_CONFIGURATION USBSCAN_PIPE_CONFIGURATION
struct _USBSCAN_GET_DESCRIPTOR USBSCAN_GET_DESCRIPTOR
struct _IO_BLOCK_EX * PIO_BLOCK_EX
struct _USBSCAN_TIMEOUT USBSCAN_TIMEOUT
struct _DRV_VERSION * PDRV_VERSION
struct _CHANNEL_INFO * PCHANNEL_INFO
struct _CHANNEL_INFO CHANNEL_INFO
struct _IO_BLOCK IO_BLOCK
_In_ WDFUSBINTERFACE _In_ UCHAR _Out_opt_ PWDF_USB_PIPE_INFORMATION PipeInfo
Definition: wdfusb.h:2543
unsigned char UCHAR
Definition: xmlstorage.h:181