Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

222 lines
6.7 KiB

  1. /*++
  2. Copyright (c) 1989-1999 Microsoft Corporation
  3. Module Name:
  4. filespyLib.h
  5. Abstract:
  6. This contains internal definitions from the fileSpy library
  7. // @@BEGIN_DDKSPLIT
  8. Author:
  9. Neal Christiansen (NealCH) 27-Sep-2000
  10. // @@END_DDKSPLIT
  11. Environment:
  12. Library used by both USER and KERNEL mode components
  13. // @@BEGIN_DDKSPLIT
  14. Revision History:
  15. Molly Brown (mollybro) 21-May-2002
  16. Modify sample to make it support running on Windows 2000 or later if
  17. built in the latest build environment and allow it to be built in W2K
  18. and later build environments.
  19. // @@END_DDKSPLIT
  20. --*/
  21. #ifndef __FILESPYLIB_H__
  22. #define __FILESPYLIB_H__
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. //
  27. // The types FASTIO that are available for the Type field of the
  28. // RECORD_FASTIO structure.
  29. //
  30. typedef enum {
  31. CHECK_IF_POSSIBLE = 1,
  32. READ,
  33. WRITE,
  34. QUERY_BASIC_INFO,
  35. QUERY_STANDARD_INFO,
  36. LOCK,
  37. UNLOCK_SINGLE,
  38. UNLOCK_ALL,
  39. UNLOCK_ALL_BY_KEY,
  40. DEVICE_CONTROL,
  41. DETACH_DEVICE,
  42. QUERY_NETWORK_OPEN_INFO,
  43. MDL_READ,
  44. MDL_READ_COMPLETE,
  45. MDL_WRITE,
  46. MDL_WRITE_COMPLETE,
  47. READ_COMPRESSED,
  48. WRITE_COMPRESSED,
  49. MDL_READ_COMPLETE_COMPRESSED,
  50. PREPARE_MDL_WRITE,
  51. MDL_WRITE_COMPLETE_COMPRESSED,
  52. QUERY_OPEN,
  53. FASTIO_MAX_OPERATION=QUERY_OPEN
  54. } FASTIO_TYPE/*, *PFASTIO_TYPE*/;
  55. //
  56. // Size of return name buffers
  57. //
  58. #define OPERATION_NAME_BUFFER_SIZE 80
  59. //
  60. // Function prototypes
  61. //
  62. extern
  63. VOID
  64. GetIrpName (
  65. IN UCHAR MajorCode,
  66. IN UCHAR MinorCode,
  67. IN ULONG FsctlCode,
  68. OUT PCHAR MajorCodeName,
  69. OUT PCHAR MinorCodeName);
  70. extern
  71. VOID
  72. GetFastioName (
  73. IN FASTIO_TYPE FastioCode,
  74. OUT PCHAR FastioName);
  75. #if WINVER >= 0x0501 /* See comment in DriverEntry */
  76. extern
  77. VOID
  78. GetFsFilterOperationName (
  79. IN UCHAR FsFilterOperation,
  80. OUT PCHAR FsFilterOperationName);
  81. #endif
  82. //
  83. // Service definitions
  84. //
  85. #define FILESPY_SERVICE_NAME L"FileSpy"
  86. #define FILESPY_SERVICE_ACCESS (STANDARD_RIGHTS_REQUIRED | \
  87. SERVICE_QUERY_CONFIG | \
  88. SERVICE_QUERY_STATUS | \
  89. SERVICE_START)
  90. //
  91. // These are copied from NTIFS.H because we need them in user mode.
  92. //
  93. #define IRP_MJ_CREATE 0x00
  94. #define IRP_MJ_CREATE_NAMED_PIPE 0x01
  95. #define IRP_MJ_CLOSE 0x02
  96. #define IRP_MJ_READ 0x03
  97. #define IRP_MJ_WRITE 0x04
  98. #define IRP_MJ_QUERY_INFORMATION 0x05
  99. #define IRP_MJ_SET_INFORMATION 0x06
  100. #define IRP_MJ_QUERY_EA 0x07
  101. #define IRP_MJ_SET_EA 0x08
  102. #define IRP_MJ_FLUSH_BUFFERS 0x09
  103. #define IRP_MJ_QUERY_VOLUME_INFORMATION 0x0a
  104. #define IRP_MJ_SET_VOLUME_INFORMATION 0x0b
  105. #define IRP_MJ_DIRECTORY_CONTROL 0x0c
  106. #define IRP_MJ_FILE_SYSTEM_CONTROL 0x0d
  107. #define IRP_MJ_DEVICE_CONTROL 0x0e
  108. #define IRP_MJ_INTERNAL_DEVICE_CONTROL 0x0f
  109. #define IRP_MJ_SHUTDOWN 0x10
  110. #define IRP_MJ_LOCK_CONTROL 0x11
  111. #define IRP_MJ_CLEANUP 0x12
  112. #define IRP_MJ_CREATE_MAILSLOT 0x13
  113. #define IRP_MJ_QUERY_SECURITY 0x14
  114. #define IRP_MJ_SET_SECURITY 0x15
  115. #define IRP_MJ_POWER 0x16
  116. #define IRP_MJ_SYSTEM_CONTROL 0x17
  117. #define IRP_MJ_DEVICE_CHANGE 0x18
  118. #define IRP_MJ_QUERY_QUOTA 0x19
  119. #define IRP_MJ_SET_QUOTA 0x1a
  120. #define IRP_MJ_PNP 0x1b
  121. #define IRP_MJ_MAXIMUM_FUNCTION 0x1b
  122. #define IRP_MN_QUERY_DIRECTORY 0x01
  123. #define IRP_MN_NOTIFY_CHANGE_DIRECTORY 0x02
  124. #define IRP_MN_USER_FS_REQUEST 0x00
  125. #define IRP_MN_MOUNT_VOLUME 0x01
  126. #define IRP_MN_VERIFY_VOLUME 0x02
  127. #define IRP_MN_LOAD_FILE_SYSTEM 0x03
  128. #define IRP_MN_TRACK_LINK 0x04
  129. #define IRP_MN_LOCK 0x01
  130. #define IRP_MN_UNLOCK_SINGLE 0x02
  131. #define IRP_MN_UNLOCK_ALL 0x03
  132. #define IRP_MN_UNLOCK_ALL_BY_KEY 0x04
  133. #define IRP_MN_NORMAL 0x00
  134. #define IRP_MN_DPC 0x01
  135. #define IRP_MN_MDL 0x02
  136. #define IRP_MN_COMPLETE 0x04
  137. #define IRP_MN_COMPRESSED 0x08
  138. #define IRP_MN_MDL_DPC (IRP_MN_MDL | IRP_MN_DPC)
  139. #define IRP_MN_COMPLETE_MDL (IRP_MN_COMPLETE | IRP_MN_MDL)
  140. #define IRP_MN_COMPLETE_MDL_DPC (IRP_MN_COMPLETE_MDL | IRP_MN_DPC)
  141. #define IRP_MN_SCSI_CLASS 0x01
  142. #define IRP_MN_START_DEVICE 0x00
  143. #define IRP_MN_QUERY_REMOVE_DEVICE 0x01
  144. #define IRP_MN_REMOVE_DEVICE 0x02
  145. #define IRP_MN_CANCEL_REMOVE_DEVICE 0x03
  146. #define IRP_MN_STOP_DEVICE 0x04
  147. #define IRP_MN_QUERY_STOP_DEVICE 0x05
  148. #define IRP_MN_CANCEL_STOP_DEVICE 0x06
  149. #define IRP_MN_QUERY_DEVICE_RELATIONS 0x07
  150. #define IRP_MN_QUERY_INTERFACE 0x08
  151. #define IRP_MN_QUERY_CAPABILITIES 0x09
  152. #define IRP_MN_QUERY_RESOURCES 0x0A
  153. #define IRP_MN_QUERY_RESOURCE_REQUIREMENTS 0x0B
  154. #define IRP_MN_QUERY_DEVICE_TEXT 0x0C
  155. #define IRP_MN_FILTER_RESOURCE_REQUIREMENTS 0x0D
  156. #define IRP_MN_READ_CONFIG 0x0F
  157. #define IRP_MN_WRITE_CONFIG 0x10
  158. #define IRP_MN_EJECT 0x11
  159. #define IRP_MN_SET_LOCK 0x12
  160. #define IRP_MN_QUERY_ID 0x13
  161. #define IRP_MN_QUERY_PNP_DEVICE_STATE 0x14
  162. #define IRP_MN_QUERY_BUS_INFORMATION 0x15
  163. #define IRP_MN_DEVICE_USAGE_NOTIFICATION 0x16
  164. #define IRP_MN_SURPRISE_REMOVAL 0x17
  165. #define IRP_MN_QUERY_LEGACY_BUS_INFORMATION 0x18
  166. #define IRP_MN_WAIT_WAKE 0x00
  167. #define IRP_MN_POWER_SEQUENCE 0x01
  168. #define IRP_MN_SET_POWER 0x02
  169. #define IRP_MN_QUERY_POWER 0x03
  170. #define IRP_MN_QUERY_ALL_DATA 0x00
  171. #define IRP_MN_QUERY_SINGLE_INSTANCE 0x01
  172. #define IRP_MN_CHANGE_SINGLE_INSTANCE 0x02
  173. #define IRP_MN_CHANGE_SINGLE_ITEM 0x03
  174. #define IRP_MN_ENABLE_EVENTS 0x04
  175. #define IRP_MN_DISABLE_EVENTS 0x05
  176. #define IRP_MN_ENABLE_COLLECTION 0x06
  177. #define IRP_MN_DISABLE_COLLECTION 0x07
  178. #define IRP_MN_REGINFO 0x08
  179. #define IRP_MN_EXECUTE_METHOD 0x09
  180. //
  181. // Lists of IRP names and FASTIO names
  182. //
  183. extern PWCHAR IrpNameList[IRP_MJ_MAXIMUM_FUNCTION+1];
  184. extern PWCHAR FastIoNameList[FASTIO_MAX_OPERATION];
  185. #ifdef __cplusplus
  186. }
  187. #endif
  188. #endif __FILESPYLIB_H__