ReactOS 0.4.16-dev-297-gc569aee
usbstor.h
Go to the documentation of this file.
1#ifndef _USBSTOR_H_
2#define _USBSTOR_H_
3
4#include <wdm.h>
5#include <usbdi.h>
6#include <usbbusif.h>
7#include <usbdlib.h>
8#include <classpnp.h>
9
10#define USB_STOR_TAG 'sbsu'
11#define USB_MAXCHILDREN (16)
12
13#define HTONS(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
14#define NTOHS(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
15
16#define HTONL(n) (((((unsigned long)(n) & 0xFF)) << 24) | \
17 ((((unsigned long)(n) & 0xFF00)) << 8) | \
18 ((((unsigned long)(n) & 0xFF0000)) >> 8) | \
19 ((((unsigned long)(n) & 0xFF000000)) >> 24))
20
21
22#define NTOHL(n) (((((unsigned long)(n) & 0xFF)) << 24) | \
23 ((((unsigned long)(n) & 0xFF00)) << 8) | \
24 ((((unsigned long)(n) & 0xFF0000)) >> 8) | \
25 ((((unsigned long)(n) & 0xFF000000)) >> 24))
26
27#define USB_RECOVERABLE_ERRORS (USBD_STATUS_STALL_PID | USBD_STATUS_DEV_NOT_RESPONDING \
28 | USBD_STATUS_ENDPOINT_HALTED | USBD_STATUS_NO_BANDWIDTH)
29
30typedef struct __COMMON_DEVICE_EXTENSION__
31{
33
35
36typedef struct
37{
38 USBSTOR_COMMON_DEVICE_EXTENSION Common; // common device extension
39
40 PDEVICE_OBJECT FunctionalDeviceObject; // functional device object
41 PDEVICE_OBJECT PhysicalDeviceObject; // physical device object
42 PDEVICE_OBJECT LowerDeviceObject; // lower device object
43 USB_BUS_INTERFACE_USBDI_V2 BusInterface; // bus interface of device
44 PUSB_DEVICE_DESCRIPTOR DeviceDescriptor; // usb device descriptor
45 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor; // usb configuration descriptor
46 PUSB_STRING_DESCRIPTOR SerialNumber; // usb serial number
47 PUSBD_INTERFACE_INFORMATION InterfaceInformation; // usb interface information
48 USBD_CONFIGURATION_HANDLE ConfigurationHandle; // usb configuration handle
49 UCHAR BulkInPipeIndex; // bulk in pipe index
50 UCHAR BulkOutPipeIndex; // bulk out pipe index
51 UCHAR MaxLUN; // max lun for device
52 PDEVICE_OBJECT ChildPDO[16]; // max 16 child pdo devices
53 KSPIN_LOCK IrpListLock; // irp list lock
54 LIST_ENTRY IrpListHead; // irp list head
55 BOOLEAN IrpListFreeze; // if true the irp list is freezed
56 BOOLEAN ResetInProgress; // if hard reset is in progress
57 ULONG IrpPendingCount; // count of irp pending
58 PSCSI_REQUEST_BLOCK ActiveSrb; // stores the current active SRB
59 KEVENT NoPendingRequests; // set if no pending or in progress requests
60 PSCSI_REQUEST_BLOCK LastTimerActiveSrb; // last timer tick active srb
61 ULONG SrbErrorHandlingActive; // error handling of srb is activated
62 ULONG TimerWorkQueueEnabled; // timer work queue enabled
63 ULONG InstanceCount; // pdo instance count
65
66typedef struct
67{
69 PDEVICE_OBJECT LowerDeviceObject; // points to FDO
70 UCHAR LUN; // lun id
71 PVOID InquiryData; // USB SCSI inquiry data
72 PUCHAR FormatData; // USB SCSI Read Format Capacity Data
73 UCHAR Claimed; // indicating if it has been claimed by upper driver
74 ULONG BlockLength; // length of block
75 ULONG LastLogicBlockAddress; // last block address
76 PDEVICE_OBJECT *PDODeviceObject; // entry in pdo list
77 PDEVICE_OBJECT Self; // self
78 UCHAR MediumTypeCode; // floppy medium type code
79 UCHAR IsFloppy; // is device floppy
81
82//
83// max lun command identifier
84//
85#define USB_BULK_GET_MAX_LUN 0xFE
86#define USB_BULK_RESET_DEVICE 0xFF
87
88#include <pshpack1.h>
89typedef struct
90{
91 ULONG Signature; // CBW signature
92 ULONG Tag; // CBW Tag of operation
93 ULONG DataTransferLength; // data transfer length
94 UCHAR Flags; // CBW Flags endpoint direction
95 UCHAR LUN; // lun unit
96 UCHAR CommandBlockLength; // Command block length
97 UCHAR CommandBlock[16];
99
100C_ASSERT(sizeof(CBW) == 31);
101
102
103#define CBW_SIGNATURE 0x43425355
104#define CSW_SIGNATURE 0x53425355
105
106#define MAX_LUN 0xF
107
108typedef struct
109{
110 ULONG Signature; // CSW signature
111 ULONG Tag; // CSW tag
112 ULONG DataResidue; // CSW data transfer diff
113 UCHAR Status; // CSW status
115
116//--------------------------------------------------------------------------------------------------------------------------------------------
117//
118// UFI INQUIRY command
119//
120typedef struct
121{
122 UCHAR Code; // operation code 0x12
123 UCHAR LUN; // lun address
124 UCHAR PageCode; // product data information, always 0x00
125 UCHAR Reserved; // reserved 0x00
126 UCHAR AllocationLength; // length of inquiry data to be returned, default 36 bytes
127 UCHAR Reserved1[7]; //reserved bytes 0x00
129
131
132#define UFI_INQUIRY_CMD_LEN 0x6
133
134//
135// UFI INQUIRY command response
136//
137typedef struct
138{
139 UCHAR DeviceType; // device type
140 UCHAR RMB; // removable media bit
141 UCHAR Version; // contains version 0x00
142 UCHAR Format; // response format
143 UCHAR Length; // additional length
144 UCHAR Reserved[3]; // reserved
145 UCHAR Vendor[8]; // vendor identification string
146 UCHAR Product[16]; // product identification string
147 UCHAR Revision[4]; // product revision code
149
151
152//--------------------------------------------------------------------------------------------------------------------------------------------
153//
154// UFI read cmd
155//
156typedef struct
157{
158 UCHAR Code; // operation code
159 UCHAR LUN; // lun
164 UCHAR Reserved; // reserved 0x00
165 UCHAR ContiguousLogicBlocksByte0; // msb contiguous logic blocks byte
166 UCHAR ContiguousLogicBlocksByte1; // msb contiguous logic blocks
167 UCHAR Reserved1[3]; // reserved 0x00
169
171
172#define UFI_READ_WRITE_CMD_LEN (0xA)
173
174//--------------------------------------------------------------------------------------------------------------------------------------------
175//
176// UFI read capacity cmd
177//
178typedef struct
179{
180 UCHAR Code; // operation code 0x25
181 UCHAR LUN; // lun address
182 UCHAR LBA[4]; // logical block address, should be zero
183 UCHAR Reserved1[2]; // reserved 0x00
184 UCHAR PMI; // PMI = 0x00
185 UCHAR Reserved2[3]; // reserved 0x00
187
189
190#define UFI_CAPACITY_CMD_LEN 0xA //FIXME support length 16 too if requested
191
192//
193// UFI Read Capacity command response
194//
195typedef struct
196{
197 ULONG LastLogicalBlockAddress; // last logical block address
198 ULONG BlockLength; // block length in bytes
200
201#define UFI_READ_CAPACITY_CMD_LEN 0xA
203
204//--------------------------------------------------------------------------------------------------------------------------------------------
205//
206// UFI sense mode cmd
207//
208typedef struct
209{
210 UCHAR Code; // operation code
211 UCHAR LUN; // lun address
212 UCHAR PageCode:6; // page code selector
213 UCHAR PC:2; // type of parameters to be returned
214 UCHAR Reserved[4]; // reserved 0x00
215 USHORT AllocationLength; // parameters length
218
219C_ASSERT(sizeof(UFI_SENSE_CMD) == 12);
220
221#define UFI_SENSE_CMD_LEN (6)
222
223typedef struct
224{
225 USHORT ModeDataLength; // length of parameters for sense cmd
226 UCHAR MediumTypeCode; // 00 for mass storage, 0x94 for floppy
227 UCHAR WP:1; // write protect bit
228 UCHAR Reserved1:2; // reserved 00
229 UCHAR DPOFUA:1; // should be zero
230 UCHAR Reserved2:4; // reserved
231 UCHAR Reserved[4]; // reserved
233
234
236
237typedef struct
238{
247
248//--------------------------------------------------------------------------------------------------------------------------------------------
249//
250// UFI read capacity cmd
251//
252
253typedef struct
254{
262
264
265#define UFI_READ_FORMAT_CAPACITY_CMD_LEN (10)
266
267typedef struct
268{
274
276
277typedef struct
278{
285
286#define UNFORMATTED_MEDIA_CODE_DESCRIPTORY_TYPE (1)
287#define FORMAT_MEDIA_CODE_DESCRIPTOR_TYPE (2)
288#define CARTRIDGE_MEDIA_CODE_DESCRIPTOR_TYPE (3)
289
290
291
292
293//--------------------------------------------------------------------------------------------------------------------------------------------
294//
295// UFI test unit command
296//
297
298typedef struct
299{
300 UCHAR Code; // operation code 0x00
301 UCHAR LUN; // lun
302 UCHAR Reserved[10]; // reserved 0x00
304
306
307#define UFI_TEST_UNIT_CMD_LEN (6)
308
309//-------------------------------------------------------------------------------------------------------------------------------------------
310typedef struct
311{
314
315#include <poppack.h>
316
317typedef struct
318{
319 union
320 {
323 };
324 URB Urb;
325 PIRP Irp;
331 ULONG ErrorIndex;
334
335typedef struct _ERRORHANDLER_WORKITEM_DATA
336{
340 PIRP Irp;
342
343
344//---------------------------------------------------------------------
345//
346// fdo.c routines
347//
351 IN OUT PIRP Irp);
352
353//---------------------------------------------------------------------
354//
355// pdo.c routines
356//
360 IN OUT PIRP Irp);
361
365 IN UCHAR LUN);
366
367//---------------------------------------------------------------------
368//
369// misc.c routines
370//
372NTAPI
375 IN OUT PIRP Irp);
376
378NTAPI
381 OUT PUSB_BUS_INTERFACE_USBDI_V2 BusInterface);
382
383PVOID
387
388VOID
390 IN PVOID Item);
391
395 OUT PURB UrbRequest);
396
400 IN PFDO_DEVICE_EXTENSION DeviceExtension);
401
403NTAPI
406 PIRP Irp,
407 PVOID Context);
408
412 IN PFDO_DEVICE_EXTENSION DeviceExtension);
413
418 OUT PUCHAR MediumTypeCode);
419
420//---------------------------------------------------------------------
421//
422// descriptor.c routines
423//
424
428
432 IN PFDO_DEVICE_EXTENSION DeviceExtension);
433
436 IN PFDO_DEVICE_EXTENSION DeviceExtension);
437
438//---------------------------------------------------------------------
439//
440// scsi.c routines
441//
445 IN PIRP Irp,
446 IN ULONG RetryCount);
447
449NTAPI
452 PIRP Irp,
453 PVOID Ctx);
454
458 PIRP Irp);
459
460VOID
463 PIRP Irp);
464
465
466//---------------------------------------------------------------------
467//
468// disk.c routines
469//
473 IN PIRP Irp);
474
478 IN PIRP Irp);
479
480//---------------------------------------------------------------------
481//
482// queue.c routines
483//
484VOID
485NTAPI
488 PIRP Irp);
489
490VOID
493
494VOID
497
501 IN PIRP Irp);
502
503VOID
504NTAPI
507 IN PIRP Irp);
508
509VOID
511 PFDO_DEVICE_EXTENSION FDODeviceExtension);
512
513VOID
514NTAPI
516 PVOID Context);
517
518VOID
519NTAPI
521 PVOID Context);
522
523
524
525VOID
528
529VOID
532 IN PIRP Irp);
533
534/* error.c */
538 IN UCHAR bEndpointAddress,
540
545
546VOID
547NTAPI
550 PVOID Context);
551
552#endif /* _USBSTOR_H_ */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
@ Reserved2
Definition: bcd.h:202
@ Reserved1
Definition: bcd.h:201
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1157
Definition: bufpool.h:45
_In_z_ PCCHAR _In_ PDEVICE_OBJECT LowerDeviceObject
Definition: classpnp.h:983
_In_ PIRP Irp
Definition: csq.h:116
static HANDLE PipeHandle
Definition: dhcpcsvc.c:22
static const WCHAR Signature[]
Definition: parser.c:141
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
Status
Definition: gdiplustypes.h:25
#define C_ASSERT(e)
Definition: intsafe.h:73
_In_ UINT Bytes
Definition: mmcopy.h:9
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT * FunctionalDeviceObject
Definition: ndis.h:4641
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE ConfigurationHandle
Definition: ndis.h:3945
_In_ ULONG Revision
Definition: rtlfuncs.h:1142
unsigned short USHORT
Definition: pedump.c:61
ULONG SerialNumber
Definition: rxce.c:117
static UCHAR ItemSize[4]
Definition: parser.c:16
const KSDEVICE_DESCRIPTOR DeviceDescriptor
Definition: splitter.c:257
Definition: usbstor.h:71
Definition: usbstor.h:88
BOOLEAN ResetInProgress
Definition: usbstor.h:56
BOOLEAN IrpListFreeze
Definition: usbstor.h:55
PMDL TransferBufferMDL
Definition: usbstor.h:330
PFDO_DEVICE_EXTENSION FDODeviceExtension
Definition: usbstor.h:328
PCBW cbw
Definition: usbstor.h:321
ULONG TransferDataLength
Definition: usbstor.h:326
PPDO_DEVICE_EXTENSION PDODeviceExtension
Definition: usbstor.h:329
PCSW csw
Definition: usbstor.h:322
ULONG RetryCount
Definition: usbstor.h:332
PUCHAR TransferData
Definition: usbstor.h:327
ULONG LastLogicBlockAddress
Definition: usbstor.h:75
UCHAR MediumTypeCode
Definition: usbstor.h:78
ULONG LastLogicalBlockAddress
Definition: usbstor.h:197
UCHAR AllocationLength
Definition: usbstor.h:126
UCHAR PageCode
Definition: usbstor.h:124
UCHAR Reserved
Definition: usbstor.h:125
UCHAR LogicalBlockByte1
Definition: usbstor.h:161
UCHAR ContiguousLogicBlocksByte0
Definition: usbstor.h:165
UCHAR LogicalBlockByte2
Definition: usbstor.h:162
UCHAR LogicalBlockByte0
Definition: usbstor.h:160
UCHAR LogicalBlockByte3
Definition: usbstor.h:163
UCHAR ContiguousLogicBlocksByte1
Definition: usbstor.h:166
UCHAR PC
Definition: usbstor.h:213
UCHAR PageCode
Definition: usbstor.h:212
UCHAR LUN
Definition: usbstor.h:211
USHORT AllocationLength
Definition: usbstor.h:215
UCHAR Code
Definition: usbstor.h:210
PDEVICE_OBJECT DeviceObject
Definition: usbstor.h:167
WORK_QUEUE_ITEM WorkQueueItem
Definition: usbstor.h:169
Definition: typedefs.h:120
Definition: usb.h:529
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
uint16_t * PUSHORT
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
IO_COMPLETION_ROUTINE USBSTOR_CSWCompletionRoutine
Definition: scsi.c:125
NTSTATUS USBSTOR_HandleExecuteSCSI(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: scsi.c:540
struct PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
struct __COMMON_DEVICE_EXTENSION__ USBSTOR_COMMON_DEVICE_EXTENSION
BOOLEAN USBSTOR_QueueAddIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: queue.c:75
VOID USBSTOR_QueueRelease(IN PDEVICE_OBJECT DeviceObject)
Definition: queue.c:262
NTSTATUS USBSTOR_FdoHandlePnp(IN PDEVICE_OBJECT DeviceObject, IN OUT PIRP Irp)
Definition: fdo.c:276
NTSTATUS USBSTOR_SyncUrbRequest(IN PDEVICE_OBJECT DeviceObject, OUT PURB UrbRequest)
Definition: misc.c:83
NTSTATUS USBSTOR_ResetPipeWithHandle(IN PDEVICE_OBJECT DeviceObject, IN USBD_PIPE_HANDLE PipeHandle)
Definition: error.c:46
struct FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
NTSTATUS USBSTOR_GetMaxLUN(IN PDEVICE_OBJECT DeviceObject, IN PFDO_DEVICE_EXTENSION DeviceExtension)
Definition: misc.c:173
NTSTATUS USBSTOR_HandleInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: disk.c:81
NTSTATUS USBSTOR_ResetDevice(IN PDEVICE_OBJECT DeviceObject, IN PFDO_DEVICE_EXTENSION DeviceExtension)
Definition: misc.c:219
NTSTATUS USBSTOR_CreatePDO(IN PDEVICE_OBJECT DeviceObject, IN UCHAR LUN)
Definition: pdo.c:864
VOID USBSTOR_QueueInitialize(PFDO_DEVICE_EXTENSION FDODeviceExtension)
Definition: queue.c:17
NTSTATUS USBSTOR_GetDescriptors(IN PDEVICE_OBJECT DeviceObject)
Definition: descriptor.c:75
struct _ERRORHANDLER_WORKITEM_DATA * PERRORHANDLER_WORKITEM_DATA
struct CBW * PCBW
VOID USBSTOR_QueueTerminateRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: queue.c:186
PVOID AllocateItem(IN POOL_TYPE PoolType, IN ULONG ItemSize)
Definition: misc.c:29
struct _ERRORHANDLER_WORKITEM_DATA ERRORHANDLER_WORKITEM_DATA
struct CSW * PCSW
struct __COMMON_DEVICE_EXTENSION__ * PUSBSTOR_COMMON_DEVICE_EXTENSION
NTSTATUS USBSTOR_PdoHandlePnp(IN PDEVICE_OBJECT DeviceObject, IN OUT PIRP Irp)
Definition: pdo.c:534
VOID USBSTOR_QueueWaitForPendingRequests(IN PDEVICE_OBJECT DeviceObject)
Definition: queue.c:171
NTSTATUS NTAPI USBSTOR_GetBusInterface(IN PDEVICE_OBJECT DeviceObject, OUT PUSB_BUS_INTERFACE_USBDI_V2 BusInterface)
Definition: misc.c:33
NTSTATUS USBSTOR_HandleDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: disk.c:413
struct IRP_CONTEXT * PIRP_CONTEXT
NTSTATUS USBSTOR_GetPipeHandles(IN PFDO_DEVICE_EXTENSION DeviceExtension)
Definition: descriptor.c:319
VOID USBSTOR_QueueNextRequest(IN PDEVICE_OBJECT DeviceObject)
Definition: queue.c:220
NTSTATUS USBSTOR_SelectConfigurationAndInterface(IN PDEVICE_OBJECT DeviceObject, IN PFDO_DEVICE_EXTENSION DeviceExtension)
Definition: descriptor.c:234
NTSTATUS USBSTOR_GetEndpointStatus(IN PDEVICE_OBJECT DeviceObject, IN UCHAR bEndpointAddress, OUT PUSHORT Value)
Definition: error.c:18
VOID NTAPI USBSTOR_CancelIo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: queue.c:28
VOID FreeItem(IN PVOID Item)
Definition: misc.c:37
VOID NTAPI USBSTOR_StartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: queue.c:300
VOID NTAPI USBSTOR_TimerRoutine(PDEVICE_OBJECT DeviceObject, PVOID Context)
Definition: error.c:205
VOID NTAPI ErrorHandlerWorkItemRoutine(PVOID Context)
Definition: error.c:248
struct UFI_CAPACITY_CMD * PUFI_CAPACITY_CMD
NTSTATUS USBSTOR_SendCBW(PIRP_CONTEXT Context, PIRP Irp)
Definition: scsi.c:591
struct UFI_CAPACITY_RESPONSE * PUFI_CAPACITY_RESPONSE
struct UFI_READ_FORMAT_CAPACITY * PUFI_READ_FORMAT_CAPACITY
struct UFI_UNKNOWN_CMD * PUFI_UNKNOWN_CMD
VOID NTAPI ResetHandlerWorkItemRoutine(PVOID Context)
struct UFI_MODE_PARAMETER_HEADER * PUFI_MODE_PARAMETER_HEADER
struct UFI_INQUIRY_CMD * PUFI_INQUIRY_CMD
BOOLEAN USBSTOR_IsFloppy(IN PUCHAR Buffer, IN ULONG BufferLength, OUT PUCHAR MediumTypeCode)
Definition: misc.c:409
struct UFI_CAPACITY_FORMAT_HEADER * PUFI_CAPACITY_FORMAT_HEADER
NTSTATUS NTAPI USBSTOR_SyncForwardIrp(IN PDEVICE_OBJECT DeviceObject, IN OUT PIRP Irp)
VOID USBSTOR_SendCSW(PIRP_CONTEXT Context, PIRP Irp)
Definition: scsi.c:379
struct UFI_TIMER_PROTECT_PAGE * PUFI_TIMER_PROTECT_PAGE
struct UFI_TEST_UNIT_CMD * PUFI_TEST_UNIT_CMD
struct UFI_INQUIRY_RESPONSE * PUFI_INQUIRY_RESPONSE
struct UFI_CAPACITY_DESCRIPTOR * PUFI_CAPACITY_DESCRIPTOR
NTSTATUS NTAPI USBSTOR_SyncForwardIrpCompletionRoutine(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
Definition: misc.c:22
struct UFI_SENSE_CMD * PUFI_SENSE_CMD
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ ULONG InstanceCount
Definition: iofuncs.h:1323
unsigned char UCHAR
Definition: xmlstorage.h:181