Author: akhaldi
Date: Sat Mar 27 02:12:23 2010
New Revision: 46482
URL:
http://svn.reactos.org/svn/reactos?rev=46482&view=rev
Log:
[DDK]
- Move devioctl.h to PSDK, introduce pragma once, apply consistent formatting and add
several missing definitions.
[XDK]
- Autogenerate devioctl.h based on devioctl.template.h
Added:
branches/header-work/include/psdk/devioctl.h
- copied, changed from r46476, branches/header-work/include/ddk/devioctl.h
branches/header-work/include/xdk/devioctl.template.h (with props)
Removed:
branches/header-work/include/ddk/devioctl.h
Modified:
branches/header-work/include/xdk/generate.bat
branches/header-work/include/xdk/iotypes.h
Removed: branches/header-work/include/ddk/devioctl.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/devioct…
==============================================================================
--- branches/header-work/include/ddk/devioctl.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/devioctl.h (removed)
@@ -1,106 +1,0 @@
-/*
- * devioctl.h
- *
- * IOCTL definitions
- *
- * This file is part of the ReactOS ddk.
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef _DEVIOCTL_
-#define _DEVIOCTL_
-
-/* 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 CTL_CODE(DeviceType, Function, Method, Access)( \
- ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) |
(Method))
-
-#define DEVICE_TYPE_FROM_CTL_CODE(ctl) (((ULONG) (ctl & 0xffff0000)) >> 16)
-
-#define METHOD_FROM_CTL_CODE(ctrlCode) ((ULONG)((ctrlCode) & 3))
-
-#define METHOD_BUFFERED 0
-#define METHOD_IN_DIRECT 1
-#define METHOD_OUT_DIRECT 2
-#define METHOD_NEITHER 3
-
-#define METHOD_DIRECT_TO_HARDWARE METHOD_IN_DIRECT
-#define METHOD_DIRECT_FROM_HARDWARE METHOD_OUT_DIRECT
-
-#define FILE_ANY_ACCESS 0x00000000
-#define FILE_SPECIAL_ACCESS FILE_ANY_ACCESS
-#define FILE_READ_ACCESS 0x00000001
-#define FILE_WRITE_ACCESS 0x00000002
-
-#endif /* !_DEVIOCTL_ */
Copied: branches/header-work/include/psdk/devioctl.h (from r46476,
branches/header-work/include/ddk/devioctl.h)
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/devioc…
==============================================================================
--- branches/header-work/include/ddk/devioctl.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/devioctl.h [iso-8859-1] Sat Mar 27 02:12:23 2010
@@ -3,7 +3,11 @@
*
* IOCTL definitions
*
- * This file is part of the ReactOS ddk.
+ * This file is part of the ReactOS PSDK package.
+ *
+ * Contributors:
+ * Amine Khaldi
+ * Timo Kreuzer (timo.kreuzer(a)reactos.org)
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
@@ -16,13 +20,12 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
+#pragma once
#ifndef _DEVIOCTL_
#define _DEVIOCTL_
-/* DEVICE_OBJECT.DeviceType */
-#define DEVICE_TYPE ULONG
#define FILE_DEVICE_BEEP 0x00000001
#define FILE_DEVICE_CD_ROM 0x00000002
@@ -81,26 +84,43 @@
#define FILE_DEVICE_SERENUM 0x00000037
#define FILE_DEVICE_TERMSRV 0x00000038
#define FILE_DEVICE_KSEC 0x00000039
-#define FILE_DEVICE_FIPS 0x0000003a
+#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
-#define CTL_CODE(DeviceType, Function, Method, Access)( \
- ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) |
(Method))
+/* DEVICE_OBJECT.DeviceType */
+#define DEVICE_TYPE ULONG
+
+
+#define CTL_CODE(DeviceType, Function, Method, Access) \
+ (((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) |
(Method))
#define DEVICE_TYPE_FROM_CTL_CODE(ctl) (((ULONG) (ctl & 0xffff0000)) >> 16)
-#define METHOD_FROM_CTL_CODE(ctrlCode) ((ULONG)((ctrlCode) & 3))
+#define METHOD_FROM_CTL_CODE(ctrlCode) ((ULONG)(ctrlCode & 3))
+
#define METHOD_BUFFERED 0
#define METHOD_IN_DIRECT 1
#define METHOD_OUT_DIRECT 2
#define METHOD_NEITHER 3
-#define METHOD_DIRECT_TO_HARDWARE METHOD_IN_DIRECT
-#define METHOD_DIRECT_FROM_HARDWARE METHOD_OUT_DIRECT
+#define METHOD_DIRECT_TO_HARDWARE METHOD_IN_DIRECT
+#define METHOD_DIRECT_FROM_HARDWARE METHOD_OUT_DIRECT
+
#define FILE_ANY_ACCESS 0x00000000
#define FILE_SPECIAL_ACCESS FILE_ANY_ACCESS
#define FILE_READ_ACCESS 0x00000001
#define FILE_WRITE_ACCESS 0x00000002
-#endif /* !_DEVIOCTL_ */
+
+
+#endif /*_DEVIOCTL_ */
Added: branches/header-work/include/xdk/devioctl.template.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/devioct…
==============================================================================
--- branches/header-work/include/xdk/devioctl.template.h (added)
+++ branches/header-work/include/xdk/devioctl.template.h [iso-8859-1] Sat Mar 27 02:12:23
2010
@@ -1,0 +1,31 @@
+/*
+ * devioctl.h
+ *
+ * IOCTL definitions
+ *
+ * This file is part of the ReactOS PSDK package.
+ *
+ * Contributors:
+ * Amine Khaldi
+ * Timo Kreuzer (timo.kreuzer(a)reactos.org)
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+#pragma once
+
+#ifndef _DEVIOCTL_
+#define _DEVIOCTL_
+
+$define (_DEVIOCTL_)
+$include (iotypes.h)
+
+#endif /*_DEVIOCTL_ */
Propchange: branches/header-work/include/xdk/devioctl.template.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/header-work/include/xdk/generate.bat
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/generat…
==============================================================================
--- branches/header-work/include/xdk/generate.bat [iso-8859-1] (original)
+++ branches/header-work/include/xdk/generate.bat [iso-8859-1] Sat Mar 27 02:12:23 2010
@@ -2,3 +2,4 @@
..\..\output-i386\tools\hpp\hpp.exe wdm.template.h wdm.h
..\..\output-i386\tools\hpp\hpp.exe ntddk.template.h ntddk.h
+..\..\output-i386\tools\hpp\hpp.exe devioctl.template.h devioctl.h
Modified: branches/header-work/include/xdk/iotypes.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/iotypes…
==============================================================================
--- branches/header-work/include/xdk/iotypes.h [iso-8859-1] (original)
+++ branches/header-work/include/xdk/iotypes.h [iso-8859-1] Sat Mar 27 02:12:23 2010
@@ -1,6 +1,8 @@
+$if (_WDMDDK_ || _NTDDK_)
/******************************************************************************
* I/O Manager Types *
******************************************************************************/
+$endif
$if (_WDMDDK_)
#define WDM_MAJORVERSION 0x06
@@ -52,7 +54,9 @@
#define IO_RESOURCE_PREFERRED 0x01
#define IO_RESOURCE_DEFAULT 0x02
#define IO_RESOURCE_ALTERNATIVE 0x08
-
+$endif
+
+$if (_WDMDDK_ || _DEVIOCTL_)
#define FILE_DEVICE_BEEP 0x00000001
#define FILE_DEVICE_CD_ROM 0x00000002
#define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
@@ -120,6 +124,8 @@
#define FILE_DEVICE_MT_TRANSPORT 0x00000043
#define FILE_DEVICE_BIOMETRIC 0x00000044
#define FILE_DEVICE_PMI 0x00000045
+$endif
+$if (_WDMDDK_)
#if defined(NT_PROCESSOR_GROUPS)
@@ -208,7 +214,9 @@
} WAIT_CONTEXT_BLOCK, *PWAIT_CONTEXT_BLOCK;
$endif
+$if (_WDMDDK_ || _NTDDK_)
/* DEVICE_OBJECT.Flags */
+$endif
$if (_NTDDK_)
#define DO_DEVICE_HAS_NAME 0x00000040
#define DO_SYSTEM_BOOT_PARTITION 0x00000100
@@ -259,9 +267,13 @@
#define FILE_128_BYTE_ALIGNMENT 0x0000007f
#define FILE_256_BYTE_ALIGNMENT 0x000000ff
#define FILE_512_BYTE_ALIGNMENT 0x000001ff
+$endif
+$if (_WDMDDK_ || _DEVIOCTL_)
/* DEVICE_OBJECT.DeviceType */
#define DEVICE_TYPE ULONG
+$endif
+$if (_WDMDDK_)
typedef struct _DEVICE_OBJECT {
CSHORT Type;
@@ -1767,14 +1779,18 @@
#define SL_WATCH_TREE 0x01
#define SL_ALLOW_RAW_MOUNT 0x01
-
+$endif
+
+$if (_WDMDDK_ || _DEVIOCTL_)
#define CTL_CODE(DeviceType, Function, Method, Access) \
(((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) |
(Method))
#define DEVICE_TYPE_FROM_CTL_CODE(ctl) (((ULONG) (ctl & 0xffff0000)) >> 16)
#define METHOD_FROM_CTL_CODE(ctrlCode) ((ULONG)(ctrlCode & 3))
-
+$endif
+
+$if (_WDMDDK_)
#define IRP_NOCACHE 0x00000001
#define IRP_PAGING_IO 0x00000002
#define IRP_MOUNT_COMPLETION 0x00000002
@@ -2825,7 +2841,9 @@
#define SL_INVOKE_ON_CANCEL 0x20
#define SL_INVOKE_ON_SUCCESS 0x40
#define SL_INVOKE_ON_ERROR 0x80
-
+$endif
+
+$if (_WDMDDK_ || _DEVIOCTL_)
#define METHOD_BUFFERED 0
#define METHOD_IN_DIRECT 1
#define METHOD_OUT_DIRECT 2
@@ -2833,7 +2851,9 @@
#define METHOD_DIRECT_TO_HARDWARE METHOD_IN_DIRECT
#define METHOD_DIRECT_FROM_HARDWARE METHOD_OUT_DIRECT
-
+$endif
+
+$if (_WDMDDK_)
#define FILE_SUPERSEDED 0x00000000
#define FILE_OPENED 0x00000001
#define FILE_CREATED 0x00000002
@@ -2921,12 +2941,16 @@
#define FILE_OPEN_REPARSE_POINT 0x00200000
#define FILE_OPEN_NO_RECALL 0x00400000
#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
-
+$endif
+
+$if (_WDMDDK_ || _DEVIOCTL_)
#define FILE_ANY_ACCESS 0x00000000
#define FILE_SPECIAL_ACCESS FILE_ANY_ACCESS
#define FILE_READ_ACCESS 0x00000001
#define FILE_WRITE_ACCESS 0x00000002
-
+$endif
+
+$if (_WDMDDK_)
#define FILE_ALL_ACCESS \
(STANDARD_RIGHTS_REQUIRED | \
SYNCHRONIZE | \
@@ -3749,7 +3773,6 @@
RTL_SIZEOF_THROUGH_FIELD(PCI_MSIX_TABLE_CONFIG_INTERFACE, UnmaskTableEntry)
$endif
$if (_NTDDK_)
-
#ifndef _ARC_DDK_
#define _ARC_DDK_
typedef enum _CONFIGURATION_TYPE {