- Implement EnumServicesStatusW.
[reactos.git] / reactos / drivers / usb / usbstor / usbstor.h
1 #include <ntddk.h>
2 #include <usbdi.h>
3 #include <usbiodef.h>
4 #include <initguid.h>
5 #include <debug.h>
6
7 #define USB_STOR_TAG TAG('u','s','b','s')
8 #define USB_MAXCHILDREN (16)
9
10 NTSTATUS STDCALL
11 IoAttachDeviceToDeviceStackSafe(
12 IN PDEVICE_OBJECT SourceDevice,
13 IN PDEVICE_OBJECT TargetDevice,
14 OUT PDEVICE_OBJECT *AttachedToDeviceObject);
15
16 typedef struct _USBSTOR_DEVICE_EXTENSION
17 {
18 BOOLEAN IsFDO;
19 struct usb_device* dev;
20 PDEVICE_OBJECT LowerDevice;
21
22 PDEVICE_OBJECT Children[USB_MAXCHILDREN];
23
24 /* Fields valid only when IsFDO == FALSE */
25 UNICODE_STRING DeviceDescription; // REG_SZ
26 UNICODE_STRING DeviceId; // REG_SZ
27 UNICODE_STRING InstanceId; // REG_SZ
28 UNICODE_STRING HardwareIds; // REG_MULTI_SZ
29 UNICODE_STRING CompatibleIds; // REG_MULTI_SZ
30 UNICODE_STRING SymbolicLinkName;
31 } USBSTOR_DEVICE_EXTENSION, *PUSBSTOR_DEVICE_EXTENSION;
32
33
34 /* cleanup.c */
35 NTSTATUS STDCALL
36 UsbStorCleanup(
37 IN PDEVICE_OBJECT DeviceObject,
38 IN PIRP Irp);
39
40 /* fdo.c */
41 NTSTATUS STDCALL
42 UsbStorPnpFdo(
43 IN PDEVICE_OBJECT DeviceObject,
44 IN PIRP Irp);
45
46 NTSTATUS
47 UsbStorDeviceControlFdo(
48 IN PDEVICE_OBJECT DeviceObject,
49 IN PIRP Irp);
50
51 /* misc.c */
52 NTSTATUS
53 ForwardIrpAndWait(
54 IN PDEVICE_OBJECT DeviceObject,
55 IN PIRP Irp);
56
57 NTSTATUS STDCALL
58 ForwardIrpAndForget(
59 IN PDEVICE_OBJECT DeviceObject,
60 IN PIRP Irp);
61
62 NTSTATUS
63 UsbStorDuplicateUnicodeString(
64 OUT PUNICODE_STRING Destination,
65 IN PUNICODE_STRING Source,
66 IN POOL_TYPE PoolType);
67
68 NTSTATUS
69 UsbStorInitMultiSzString(
70 OUT PUNICODE_STRING Destination,
71 ... /* list of PCSZ */);
72
73 /* pdo.c */
74 NTSTATUS STDCALL
75 UsbStorPnpPdo(
76 IN PDEVICE_OBJECT DeviceObject,
77 IN PIRP Irp);
78
79 NTSTATUS
80 UsbStorDeviceControlPdo(
81 IN PDEVICE_OBJECT DeviceObject,
82 IN PIRP Irp);
83