Author: akhaldi
Date: Sun Feb 28 10:46:46 2010
New Revision: 45723
URL:
http://svn.reactos.org/svn/reactos?rev=45723&view=rev
Log:
- Move more stuff to wdm.h
- Add VPB_DIRECT_WRITES_ALLOWED, several missing FILE_CHARACTERISTIC_* and several missing
FILE_DEVICE_*
- Fix _DEVICE_RELATION_TYPE
- Improve _DEVICE_OBJECT and _SCATTER_GATHER_LIST
Modified:
branches/header-work/include/ddk/wdm.h
branches/header-work/include/ddk/winddk.h
Modified: branches/header-work/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
==============================================================================
--- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Sun Feb 28 10:46:46 2010
@@ -1535,6 +1535,243 @@
MaximumDmaSpeed
} DMA_SPEED, *PDMA_SPEED;
+/* DEVICE_DESCRIPTION.Version */
+
+#define DEVICE_DESCRIPTION_VERSION 0x0000
+#define DEVICE_DESCRIPTION_VERSION1 0x0001
+#define DEVICE_DESCRIPTION_VERSION2 0x0002
+
+typedef struct _DEVICE_DESCRIPTION {
+ ULONG Version;
+ BOOLEAN Master;
+ BOOLEAN ScatterGather;
+ BOOLEAN DemandMode;
+ BOOLEAN AutoInitialize;
+ BOOLEAN Dma32BitAddresses;
+ BOOLEAN IgnoreCount;
+ BOOLEAN Reserved1;
+ BOOLEAN Dma64BitAddresses;
+ ULONG BusNumber;
+ ULONG DmaChannel;
+ INTERFACE_TYPE InterfaceType;
+ DMA_WIDTH DmaWidth;
+ DMA_SPEED DmaSpeed;
+ ULONG MaximumLength;
+ ULONG DmaPort;
+} DEVICE_DESCRIPTION, *PDEVICE_DESCRIPTION;
+
+/* VPB.Flags */
+#define VPB_MOUNTED 0x0001
+#define VPB_LOCKED 0x0002
+#define VPB_PERSISTENT 0x0004
+#define VPB_REMOVE_PENDING 0x0008
+#define VPB_RAW_MOUNT 0x0010
+#define VPB_DIRECT_WRITES_ALLOWED 0x0020
+
+#define MAXIMUM_VOLUME_LABEL_LENGTH (32 * sizeof(WCHAR))
+
+typedef struct _VPB {
+ CSHORT Type;
+ CSHORT Size;
+ USHORT Flags;
+ USHORT VolumeLabelLength;
+ struct _DEVICE_OBJECT *DeviceObject;
+ struct _DEVICE_OBJECT *RealDevice;
+ ULONG SerialNumber;
+ ULONG ReferenceCount;
+ WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)];
+} VPB, *PVPB;
+
+/* DEVICE_OBJECT.Flags */
+
+#define DO_VERIFY_VOLUME 0x00000002
+#define DO_BUFFERED_IO 0x00000004
+#define DO_EXCLUSIVE 0x00000008
+#define DO_DIRECT_IO 0x00000010
+#define DO_MAP_IO_BUFFER 0x00000020
+#define DO_DEVICE_INITIALIZING 0x00000080
+#define DO_SHUTDOWN_REGISTERED 0x00000800
+#define DO_BUS_ENUMERATED_DEVICE 0x00001000
+#define DO_POWER_PAGABLE 0x00002000
+#define DO_POWER_INRUSH 0x00004000
+
+/* DEVICE_OBJECT.Characteristics */
+
+#define FILE_REMOVABLE_MEDIA 0x00000001
+#define FILE_READ_ONLY_DEVICE 0x00000002
+#define FILE_FLOPPY_DISKETTE 0x00000004
+#define FILE_WRITE_ONCE_MEDIA 0x00000008
+#define FILE_REMOTE_DEVICE 0x00000010
+#define FILE_DEVICE_IS_MOUNTED 0x00000020
+#define FILE_VIRTUAL_VOLUME 0x00000040
+#define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
+#define FILE_DEVICE_SECURE_OPEN 0x00000100
+#define FILE_CHARACTERISTIC_PNP_DEVICE 0x00000800
+#define FILE_CHARACTERISTIC_TS_DEVICE 0x00001000
+#define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x00002000
+
+/* DEVICE_OBJECT.AlignmentRequirement */
+
+#define FILE_BYTE_ALIGNMENT 0x00000000
+#define FILE_WORD_ALIGNMENT 0x00000001
+#define FILE_LONG_ALIGNMENT 0x00000003
+#define FILE_QUAD_ALIGNMENT 0x00000007
+#define FILE_OCTA_ALIGNMENT 0x0000000f
+#define FILE_32_BYTE_ALIGNMENT 0x0000001f
+#define FILE_64_BYTE_ALIGNMENT 0x0000003f
+#define FILE_128_BYTE_ALIGNMENT 0x0000007f
+#define FILE_256_BYTE_ALIGNMENT 0x000000ff
+#define FILE_512_BYTE_ALIGNMENT 0x000001ff
+
+/* DEVICE_OBJECT.DeviceType */
+
+#define DEVICE_TYPE ULONG
+
+#define FILE_DEVICE_BEEP 0x00000001
+#define FILE_DEVICE_CD_ROM 0x00000002
+#define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
+#define FILE_DEVICE_CONTROLLER 0x00000004
+#define FILE_DEVICE_DATALINK 0x00000005
+#define FILE_DEVICE_DFS 0x00000006
+#define FILE_DEVICE_DISK 0x00000007
+#define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
+#define FILE_DEVICE_FILE_SYSTEM 0x00000009
+#define FILE_DEVICE_INPORT_PORT 0x0000000a
+#define FILE_DEVICE_KEYBOARD 0x0000000b
+#define FILE_DEVICE_MAILSLOT 0x0000000c
+#define FILE_DEVICE_MIDI_IN 0x0000000d
+#define FILE_DEVICE_MIDI_OUT 0x0000000e
+#define FILE_DEVICE_MOUSE 0x0000000f
+#define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
+#define FILE_DEVICE_NAMED_PIPE 0x00000011
+#define FILE_DEVICE_NETWORK 0x00000012
+#define FILE_DEVICE_NETWORK_BROWSER 0x00000013
+#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
+#define FILE_DEVICE_NULL 0x00000015
+#define FILE_DEVICE_PARALLEL_PORT 0x00000016
+#define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
+#define FILE_DEVICE_PRINTER 0x00000018
+#define FILE_DEVICE_SCANNER 0x00000019
+#define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
+#define FILE_DEVICE_SERIAL_PORT 0x0000001b
+#define FILE_DEVICE_SCREEN 0x0000001c
+#define FILE_DEVICE_SOUND 0x0000001d
+#define FILE_DEVICE_STREAMS 0x0000001e
+#define FILE_DEVICE_TAPE 0x0000001f
+#define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
+#define FILE_DEVICE_TRANSPORT 0x00000021
+#define FILE_DEVICE_UNKNOWN 0x00000022
+#define FILE_DEVICE_VIDEO 0x00000023
+#define FILE_DEVICE_VIRTUAL_DISK 0x00000024
+#define FILE_DEVICE_WAVE_IN 0x00000025
+#define FILE_DEVICE_WAVE_OUT 0x00000026
+#define FILE_DEVICE_8042_PORT 0x00000027
+#define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
+#define FILE_DEVICE_BATTERY 0x00000029
+#define FILE_DEVICE_BUS_EXTENDER 0x0000002a
+#define FILE_DEVICE_MODEM 0x0000002b
+#define FILE_DEVICE_VDM 0x0000002c
+#define FILE_DEVICE_MASS_STORAGE 0x0000002d
+#define FILE_DEVICE_SMB 0x0000002e
+#define FILE_DEVICE_KS 0x0000002f
+#define FILE_DEVICE_CHANGER 0x00000030
+#define FILE_DEVICE_SMARTCARD 0x00000031
+#define FILE_DEVICE_ACPI 0x00000032
+#define FILE_DEVICE_DVD 0x00000033
+#define FILE_DEVICE_FULLSCREEN_VIDEO 0x00000034
+#define FILE_DEVICE_DFS_FILE_SYSTEM 0x00000035
+#define FILE_DEVICE_DFS_VOLUME 0x00000036
+#define FILE_DEVICE_SERENUM 0x00000037
+#define FILE_DEVICE_TERMSRV 0x00000038
+#define FILE_DEVICE_KSEC 0x00000039
+#define FILE_DEVICE_FIPS 0x0000003a
+#define FILE_DEVICE_INFINIBAND 0x0000003b
+#define FILE_DEVICE_VMBUS 0x0000003e
+#define FILE_DEVICE_CRYPT_PROVIDER 0x0000003f
+#define FILE_DEVICE_WPD 0x00000040
+#define FILE_DEVICE_BLUETOOTH 0x00000041
+#define FILE_DEVICE_MT_COMPOSITE 0x00000042
+#define FILE_DEVICE_MT_TRANSPORT 0x00000043
+#define FILE_DEVICE_BIOMETRIC 0x00000044
+#define FILE_DEVICE_PMI 0x00000045
+
+typedef struct DECLSPEC_ALIGN(MEMORY_ALLOCATION_ALIGNMENT) _DEVICE_OBJECT {
+ CSHORT Type;
+ USHORT Size;
+ LONG ReferenceCount;
+ struct _DRIVER_OBJECT *DriverObject;
+ struct _DEVICE_OBJECT *NextDevice;
+ struct _DEVICE_OBJECT *AttachedDevice;
+ struct _IRP *CurrentIrp;
+ PIO_TIMER Timer;
+ ULONG Flags;
+ ULONG Characteristics;
+ volatile PVPB Vpb;
+ PVOID DeviceExtension;
+ DEVICE_TYPE DeviceType;
+ CCHAR StackSize;
+ union {
+ LIST_ENTRY ListEntry;
+ WAIT_CONTEXT_BLOCK Wcb;
+ } Queue;
+ ULONG AlignmentRequirement;
+ KDEVICE_QUEUE DeviceQueue;
+ KDPC Dpc;
+ ULONG ActiveThreadCount;
+ PSECURITY_DESCRIPTOR SecurityDescriptor;
+ KEVENT DeviceLock;
+ USHORT SectorSize;
+ USHORT Spare1;
+ struct _DEVOBJ_EXTENSION *DeviceObjectExtension;
+ PVOID Reserved;
+} DEVICE_OBJECT, *PDEVICE_OBJECT;
+
+typedef enum _DEVICE_RELATION_TYPE {
+ BusRelations,
+ EjectionRelations,
+ PowerRelations,
+ RemovalRelations,
+ TargetDeviceRelation,
+ SingleBusRelations,
+ TransportRelations
+} DEVICE_RELATION_TYPE, *PDEVICE_RELATION_TYPE;
+
+typedef struct _DEVICE_RELATIONS {
+ ULONG Count;
+ PDEVICE_OBJECT Objects[1];
+} DEVICE_RELATIONS, *PDEVICE_RELATIONS;
+
+typedef struct _SCATTER_GATHER_ELEMENT {
+ PHYSICAL_ADDRESS Address;
+ ULONG Length;
+ ULONG_PTR Reserved;
+} SCATTER_GATHER_ELEMENT, *PSCATTER_GATHER_ELEMENT;
+
+#if defined(_MSC_EXTENSIONS)
+
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+#pragma warning(disable:4200)
+typedef struct _SCATTER_GATHER_LIST {
+ ULONG NumberOfElements;
+ ULONG_PTR Reserved;
+ SCATTER_GATHER_ELEMENT Elements[1];
+} SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
+
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#else
+#pragma warning(default:4200)
+#endif
+
+#else
+
+struct _SCATTER_GATHER_LIST;
+typedef struct _SCATTER_GATHER_LIST SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
+
+#endif
+
/* Simple types */
typedef UCHAR KPROCESSOR_MODE;
typedef LONG KPRIORITY;
Modified: branches/header-work/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
==============================================================================
--- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Sun Feb 28 10:46:46 2010
@@ -522,215 +522,14 @@
LARGE_INTEGER Spare2;
} CONTROLLER_OBJECT, *PCONTROLLER_OBJECT;
-/* DEVICE_DESCRIPTION.Version */
-
-#define DEVICE_DESCRIPTION_VERSION 0x0000
-#define DEVICE_DESCRIPTION_VERSION1 0x0001
-#define DEVICE_DESCRIPTION_VERSION2 0x0002
-
-typedef struct _DEVICE_DESCRIPTION {
- ULONG Version;
- BOOLEAN Master;
- BOOLEAN ScatterGather;
- BOOLEAN DemandMode;
- BOOLEAN AutoInitialize;
- BOOLEAN Dma32BitAddresses;
- BOOLEAN IgnoreCount;
- BOOLEAN Reserved1;
- BOOLEAN Dma64BitAddresses;
- ULONG BusNumber;
- ULONG DmaChannel;
- INTERFACE_TYPE InterfaceType;
- DMA_WIDTH DmaWidth;
- DMA_SPEED DmaSpeed;
- ULONG MaximumLength;
- ULONG DmaPort;
-} DEVICE_DESCRIPTION, *PDEVICE_DESCRIPTION;
-
-/* VPB.Flags */
-#define VPB_MOUNTED 0x0001
-#define VPB_LOCKED 0x0002
-#define VPB_PERSISTENT 0x0004
-#define VPB_REMOVE_PENDING 0x0008
-#define VPB_RAW_MOUNT 0x0010
-
-#define MAXIMUM_VOLUME_LABEL_LENGTH (32 * sizeof(WCHAR))
-
-typedef struct _VPB {
- CSHORT Type;
- CSHORT Size;
- USHORT Flags;
- USHORT VolumeLabelLength;
- struct _DEVICE_OBJECT *DeviceObject;
- struct _DEVICE_OBJECT *RealDevice;
- ULONG SerialNumber;
- ULONG ReferenceCount;
- WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)];
-} VPB, *PVPB;
-
/* DEVICE_OBJECT.Flags */
-#define DO_VERIFY_VOLUME 0x00000002
-#define DO_BUFFERED_IO 0x00000004
-#define DO_EXCLUSIVE 0x00000008
-#define DO_DIRECT_IO 0x00000010
-#define DO_MAP_IO_BUFFER 0x00000020
#define DO_DEVICE_HAS_NAME 0x00000040
-#define DO_DEVICE_INITIALIZING 0x00000080
#define DO_SYSTEM_BOOT_PARTITION 0x00000100
#define DO_LONG_TERM_REQUESTS 0x00000200
#define DO_NEVER_LAST_DEVICE 0x00000400
-#define DO_SHUTDOWN_REGISTERED 0x00000800
-#define DO_BUS_ENUMERATED_DEVICE 0x00001000
-#define DO_POWER_PAGABLE 0x00002000
-#define DO_POWER_INRUSH 0x00004000
#define DO_LOW_PRIORITY_FILESYSTEM 0x00010000
#define DO_XIP 0x00020000
-
-/* DEVICE_OBJECT.Characteristics */
-
-#define FILE_REMOVABLE_MEDIA 0x00000001
-#define FILE_READ_ONLY_DEVICE 0x00000002
-#define FILE_FLOPPY_DISKETTE 0x00000004
-#define FILE_WRITE_ONCE_MEDIA 0x00000008
-#define FILE_REMOTE_DEVICE 0x00000010
-#define FILE_DEVICE_IS_MOUNTED 0x00000020
-#define FILE_VIRTUAL_VOLUME 0x00000040
-#define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
-#define FILE_DEVICE_SECURE_OPEN 0x00000100
-
-/* DEVICE_OBJECT.AlignmentRequirement */
-
-#define FILE_BYTE_ALIGNMENT 0x00000000
-#define FILE_WORD_ALIGNMENT 0x00000001
-#define FILE_LONG_ALIGNMENT 0x00000003
-#define FILE_QUAD_ALIGNMENT 0x00000007
-#define FILE_OCTA_ALIGNMENT 0x0000000f
-#define FILE_32_BYTE_ALIGNMENT 0x0000001f
-#define FILE_64_BYTE_ALIGNMENT 0x0000003f
-#define FILE_128_BYTE_ALIGNMENT 0x0000007f
-#define FILE_256_BYTE_ALIGNMENT 0x000000ff
-#define FILE_512_BYTE_ALIGNMENT 0x000001ff
-
-/* DEVICE_OBJECT.DeviceType */
-
-#define DEVICE_TYPE ULONG
-
-#define FILE_DEVICE_BEEP 0x00000001
-#define FILE_DEVICE_CD_ROM 0x00000002
-#define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
-#define FILE_DEVICE_CONTROLLER 0x00000004
-#define FILE_DEVICE_DATALINK 0x00000005
-#define FILE_DEVICE_DFS 0x00000006
-#define FILE_DEVICE_DISK 0x00000007
-#define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
-#define FILE_DEVICE_FILE_SYSTEM 0x00000009
-#define FILE_DEVICE_INPORT_PORT 0x0000000a
-#define FILE_DEVICE_KEYBOARD 0x0000000b
-#define FILE_DEVICE_MAILSLOT 0x0000000c
-#define FILE_DEVICE_MIDI_IN 0x0000000d
-#define FILE_DEVICE_MIDI_OUT 0x0000000e
-#define FILE_DEVICE_MOUSE 0x0000000f
-#define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
-#define FILE_DEVICE_NAMED_PIPE 0x00000011
-#define FILE_DEVICE_NETWORK 0x00000012
-#define FILE_DEVICE_NETWORK_BROWSER 0x00000013
-#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
-#define FILE_DEVICE_NULL 0x00000015
-#define FILE_DEVICE_PARALLEL_PORT 0x00000016
-#define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
-#define FILE_DEVICE_PRINTER 0x00000018
-#define FILE_DEVICE_SCANNER 0x00000019
-#define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
-#define FILE_DEVICE_SERIAL_PORT 0x0000001b
-#define FILE_DEVICE_SCREEN 0x0000001c
-#define FILE_DEVICE_SOUND 0x0000001d
-#define FILE_DEVICE_STREAMS 0x0000001e
-#define FILE_DEVICE_TAPE 0x0000001f
-#define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
-#define FILE_DEVICE_TRANSPORT 0x00000021
-#define FILE_DEVICE_UNKNOWN 0x00000022
-#define FILE_DEVICE_VIDEO 0x00000023
-#define FILE_DEVICE_VIRTUAL_DISK 0x00000024
-#define FILE_DEVICE_WAVE_IN 0x00000025
-#define FILE_DEVICE_WAVE_OUT 0x00000026
-#define FILE_DEVICE_8042_PORT 0x00000027
-#define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
-#define FILE_DEVICE_BATTERY 0x00000029
-#define FILE_DEVICE_BUS_EXTENDER 0x0000002a
-#define FILE_DEVICE_MODEM 0x0000002b
-#define FILE_DEVICE_VDM 0x0000002c
-#define FILE_DEVICE_MASS_STORAGE 0x0000002d
-#define FILE_DEVICE_SMB 0x0000002e
-#define FILE_DEVICE_KS 0x0000002f
-#define FILE_DEVICE_CHANGER 0x00000030
-#define FILE_DEVICE_SMARTCARD 0x00000031
-#define FILE_DEVICE_ACPI 0x00000032
-#define FILE_DEVICE_DVD 0x00000033
-#define FILE_DEVICE_FULLSCREEN_VIDEO 0x00000034
-#define FILE_DEVICE_DFS_FILE_SYSTEM 0x00000035
-#define FILE_DEVICE_DFS_VOLUME 0x00000036
-#define FILE_DEVICE_SERENUM 0x00000037
-#define FILE_DEVICE_TERMSRV 0x00000038
-#define FILE_DEVICE_KSEC 0x00000039
-#define FILE_DEVICE_FIPS 0x0000003a
-
-typedef struct _DEVICE_OBJECT {
- CSHORT Type;
- USHORT Size;
- LONG ReferenceCount;
- struct _DRIVER_OBJECT *DriverObject;
- struct _DEVICE_OBJECT *NextDevice;
- struct _DEVICE_OBJECT *AttachedDevice;
- struct _IRP *CurrentIrp;
- PIO_TIMER Timer;
- ULONG Flags;
- ULONG Characteristics;
- volatile PVPB Vpb;
- PVOID DeviceExtension;
- DEVICE_TYPE DeviceType;
- CCHAR StackSize;
- union {
- LIST_ENTRY ListEntry;
- WAIT_CONTEXT_BLOCK Wcb;
- } Queue;
- ULONG AlignmentRequirement;
- KDEVICE_QUEUE DeviceQueue;
- KDPC Dpc;
- ULONG ActiveThreadCount;
- PSECURITY_DESCRIPTOR SecurityDescriptor;
- KEVENT DeviceLock;
- USHORT SectorSize;
- USHORT Spare1;
- struct _DEVOBJ_EXTENSION *DeviceObjectExtension;
- PVOID Reserved;
-} DEVICE_OBJECT, *PDEVICE_OBJECT;
-
-typedef enum _DEVICE_RELATION_TYPE {
- BusRelations,
- EjectionRelations,
- PowerRelations,
- RemovalRelations,
- TargetDeviceRelation,
- SingleBusRelations
-} DEVICE_RELATION_TYPE, *PDEVICE_RELATION_TYPE;
-
-typedef struct _DEVICE_RELATIONS {
- ULONG Count;
- PDEVICE_OBJECT Objects[1];
-} DEVICE_RELATIONS, *PDEVICE_RELATIONS;
-
-typedef struct _SCATTER_GATHER_ELEMENT {
- PHYSICAL_ADDRESS Address;
- ULONG Length;
- ULONG_PTR Reserved;
-} SCATTER_GATHER_ELEMENT, *PSCATTER_GATHER_ELEMENT;
-
-typedef struct _SCATTER_GATHER_LIST {
- ULONG NumberOfElements;
- ULONG_PTR Reserved;
- SCATTER_GATHER_ELEMENT Elements[1];
-} SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
#define MDL_MAPPED_TO_SYSTEM_VA 0x0001
#define MDL_PAGES_LOCKED 0x0002