devioctl.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * devioctl.h
  3. *
  4. * IOCTL definitions
  5. *
  6. * This file is part of the ReactOS PSDK package.
  7. *
  8. * Contributors:
  9. * Amine Khaldi
  10. * Timo Kreuzer (timo.kreuzer@reactos.org)
  11. *
  12. * THIS SOFTWARE IS NOT COPYRIGHTED
  13. *
  14. * This source code is offered for use in the public domain. You may
  15. * use, modify or distribute it freely.
  16. *
  17. * This code is distributed in the hope that it will be useful but
  18. * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  19. * DISCLAIMED. This includes but is not limited to warranties of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  21. *
  22. */
  23. #pragma once
  24. #ifndef _DEVIOCTL_
  25. #define _DEVIOCTL_
  26. #define FILE_DEVICE_BEEP 0x00000001
  27. #define FILE_DEVICE_CD_ROM 0x00000002
  28. #define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
  29. #define FILE_DEVICE_CONTROLLER 0x00000004
  30. #define FILE_DEVICE_DATALINK 0x00000005
  31. #define FILE_DEVICE_DFS 0x00000006
  32. #define FILE_DEVICE_DISK 0x00000007
  33. #define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
  34. #define FILE_DEVICE_FILE_SYSTEM 0x00000009
  35. #define FILE_DEVICE_INPORT_PORT 0x0000000a
  36. #define FILE_DEVICE_KEYBOARD 0x0000000b
  37. #define FILE_DEVICE_MAILSLOT 0x0000000c
  38. #define FILE_DEVICE_MIDI_IN 0x0000000d
  39. #define FILE_DEVICE_MIDI_OUT 0x0000000e
  40. #define FILE_DEVICE_MOUSE 0x0000000f
  41. #define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
  42. #define FILE_DEVICE_NAMED_PIPE 0x00000011
  43. #define FILE_DEVICE_NETWORK 0x00000012
  44. #define FILE_DEVICE_NETWORK_BROWSER 0x00000013
  45. #define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
  46. #define FILE_DEVICE_NULL 0x00000015
  47. #define FILE_DEVICE_PARALLEL_PORT 0x00000016
  48. #define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
  49. #define FILE_DEVICE_PRINTER 0x00000018
  50. #define FILE_DEVICE_SCANNER 0x00000019
  51. #define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
  52. #define FILE_DEVICE_SERIAL_PORT 0x0000001b
  53. #define FILE_DEVICE_SCREEN 0x0000001c
  54. #define FILE_DEVICE_SOUND 0x0000001d
  55. #define FILE_DEVICE_STREAMS 0x0000001e
  56. #define FILE_DEVICE_TAPE 0x0000001f
  57. #define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
  58. #define FILE_DEVICE_TRANSPORT 0x00000021
  59. #define FILE_DEVICE_UNKNOWN 0x00000022
  60. #define FILE_DEVICE_VIDEO 0x00000023
  61. #define FILE_DEVICE_VIRTUAL_DISK 0x00000024
  62. #define FILE_DEVICE_WAVE_IN 0x00000025
  63. #define FILE_DEVICE_WAVE_OUT 0x00000026
  64. #define FILE_DEVICE_8042_PORT 0x00000027
  65. #define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
  66. #define FILE_DEVICE_BATTERY 0x00000029
  67. #define FILE_DEVICE_BUS_EXTENDER 0x0000002a
  68. #define FILE_DEVICE_MODEM 0x0000002b
  69. #define FILE_DEVICE_VDM 0x0000002c
  70. #define FILE_DEVICE_MASS_STORAGE 0x0000002d
  71. #define FILE_DEVICE_SMB 0x0000002e
  72. #define FILE_DEVICE_KS 0x0000002f
  73. #define FILE_DEVICE_CHANGER 0x00000030
  74. #define FILE_DEVICE_SMARTCARD 0x00000031
  75. #define FILE_DEVICE_ACPI 0x00000032
  76. #define FILE_DEVICE_DVD 0x00000033
  77. #define FILE_DEVICE_FULLSCREEN_VIDEO 0x00000034
  78. #define FILE_DEVICE_DFS_FILE_SYSTEM 0x00000035
  79. #define FILE_DEVICE_DFS_VOLUME 0x00000036
  80. #define FILE_DEVICE_SERENUM 0x00000037
  81. #define FILE_DEVICE_TERMSRV 0x00000038
  82. #define FILE_DEVICE_KSEC 0x00000039
  83. #define FILE_DEVICE_FIPS 0x0000003A
  84. #define FILE_DEVICE_INFINIBAND 0x0000003B
  85. #define FILE_DEVICE_VMBUS 0x0000003E
  86. #define FILE_DEVICE_CRYPT_PROVIDER 0x0000003F
  87. #define FILE_DEVICE_WPD 0x00000040
  88. #define FILE_DEVICE_BLUETOOTH 0x00000041
  89. #define FILE_DEVICE_MT_COMPOSITE 0x00000042
  90. #define FILE_DEVICE_MT_TRANSPORT 0x00000043
  91. #define FILE_DEVICE_BIOMETRIC 0x00000044
  92. #define FILE_DEVICE_PMI 0x00000045
  93. /* DEVICE_OBJECT.DeviceType */
  94. #define DEVICE_TYPE ULONG
  95. #define CTL_CODE(DeviceType, Function, Method, Access) \
  96. (((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
  97. #define DEVICE_TYPE_FROM_CTL_CODE(ctl) (((ULONG) (ctl & 0xffff0000)) >> 16)
  98. #define METHOD_FROM_CTL_CODE(ctrlCode) ((ULONG)(ctrlCode & 3))
  99. #define METHOD_BUFFERED 0
  100. #define METHOD_IN_DIRECT 1
  101. #define METHOD_OUT_DIRECT 2
  102. #define METHOD_NEITHER 3
  103. #define METHOD_DIRECT_TO_HARDWARE METHOD_IN_DIRECT
  104. #define METHOD_DIRECT_FROM_HARDWARE METHOD_OUT_DIRECT
  105. #define FILE_ANY_ACCESS 0x00000000
  106. #define FILE_SPECIAL_ACCESS FILE_ANY_ACCESS
  107. #define FILE_READ_ACCESS 0x00000001
  108. #define FILE_WRITE_ACCESS 0x00000002
  109. #endif /*_DEVIOCTL_ */