Source code of Windows XP (NT5)
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.

620 lines
25 KiB

  1. /*++
  2. Copyright (c) 1989-1999 Microsoft Corporation
  3. Module Name:
  4. irpName.c
  5. Abstract:
  6. This module contains functions used to generate names for IRPs
  7. // @@BEGIN_DDKSPLIT
  8. Author:
  9. Neal Christiansen (NealCH) 27-Sep-2000
  10. // @@END_DDKSPLIT
  11. Environment:
  12. User mode
  13. // @@BEGIN_DDKSPLIT
  14. Revision History:
  15. // @@END_DDKSPLIT
  16. --*/
  17. #include <ntifs.h>
  18. #include <stdio.h>
  19. #include "ioTestLib.h"
  20. //
  21. // Globals
  22. //
  23. CHAR UnknownIrpMinor[] = "Unknown Irp minor code (%u)";
  24. VOID
  25. GetIrpName (
  26. IN UCHAR MajorCode,
  27. IN UCHAR MinorCode,
  28. IN ULONG FsctlCode,
  29. OUT PCHAR MajorCodeName,
  30. OUT PCHAR MinorCodeName
  31. )
  32. /*++
  33. Routine Description:
  34. This routine translates the given Irp codes into printable strings which
  35. are returned. This guarentees to routine valid strings in each buffer.
  36. The MinorCode string may be a NULL string (not a null pointer).
  37. Arguments:
  38. MajorCode - the IRP Major code of the operation
  39. MinorCode - the IRP Minor code of the operation
  40. FsctlCode - if this is an IRP_MJ_FILE_SYSTEM_CONTROL/IRP_MN_USER_FS_REQUEST
  41. operation then this is the FSCTL code whose name is also
  42. translated. This name is returned as part of the MinorCode
  43. string.
  44. MajorCodeName - a string buffer at least OPERATION_NAME_BUFFER_SIZE
  45. characters long that receives the major code name.
  46. MinorCodeName - a string buffer at least OPERATION_NAME_BUFFER_SIZE
  47. characters long that receives the minor/fsctl code name.
  48. Return Value:
  49. None.
  50. --*/
  51. {
  52. PCHAR irpMajorString;
  53. PCHAR irpMinorString = "";
  54. CHAR nameBuf[OPERATION_NAME_BUFFER_SIZE];
  55. switch (MajorCode) {
  56. case IRP_MJ_CREATE:
  57. irpMajorString = "IRP_MJ_CREATE";
  58. break;
  59. case IRP_MJ_CREATE_NAMED_PIPE:
  60. irpMajorString = "IRP_MJ_CREATE_NAMED_PIPE";
  61. break;
  62. case IRP_MJ_CLOSE:
  63. irpMajorString = "IRP_MJ_CLOSE";
  64. break;
  65. case IRP_MJ_READ:
  66. irpMajorString = "IRP_MJ_READ";
  67. switch (MinorCode) {
  68. case IRP_MN_NORMAL:
  69. irpMinorString = "IRP_MN_NORMAL";
  70. break;
  71. case IRP_MN_DPC:
  72. irpMinorString = "IRP_MN_DPC";
  73. break;
  74. case IRP_MN_MDL:
  75. irpMinorString = "IRP_MN_MDL";
  76. break;
  77. case IRP_MN_COMPLETE:
  78. irpMinorString = "IRP_MN_COMPLETE";
  79. break;
  80. case IRP_MN_COMPRESSED:
  81. irpMinorString = "IRP_MN_COMPRESSED";
  82. break;
  83. case IRP_MN_MDL_DPC:
  84. irpMinorString = "IRP_MN_MDL_DPC";
  85. break;
  86. case IRP_MN_COMPLETE_MDL:
  87. irpMinorString = "IRP_MN_COMPLETE_MDL";
  88. break;
  89. case IRP_MN_COMPLETE_MDL_DPC:
  90. irpMinorString = "IRP_MN_COMPLETE_MDL_DPC";
  91. break;
  92. default:
  93. sprintf( nameBuf, UnknownIrpMinor, MinorCode );
  94. irpMinorString = nameBuf;
  95. }
  96. break;
  97. case IRP_MJ_WRITE:
  98. irpMajorString = "IRP_MJ_WRITE";
  99. switch (MinorCode) {
  100. case IRP_MN_NORMAL:
  101. irpMinorString = "IRP_MN_NORMAL";
  102. break;
  103. case IRP_MN_DPC:
  104. irpMinorString = "IRP_MN_DPC";
  105. break;
  106. case IRP_MN_MDL:
  107. irpMinorString = "IRP_MN_MDL";
  108. break;
  109. case IRP_MN_COMPLETE:
  110. irpMinorString = "IRP_MN_COMPLETE";
  111. break;
  112. case IRP_MN_COMPRESSED:
  113. irpMinorString = "IRP_MN_COMPRESSED";
  114. break;
  115. case IRP_MN_MDL_DPC:
  116. irpMinorString = "IRP_MN_MDL_DPC";
  117. break;
  118. case IRP_MN_COMPLETE_MDL:
  119. irpMinorString = "IRP_MN_COMPLETE_MDL";
  120. break;
  121. case IRP_MN_COMPLETE_MDL_DPC:
  122. irpMinorString = "IRP_MN_COMPLETE_MDL_DPC";
  123. break;
  124. default:
  125. sprintf(nameBuf,UnknownIrpMinor,MinorCode);
  126. irpMinorString = nameBuf;
  127. }
  128. break;
  129. case IRP_MJ_QUERY_INFORMATION:
  130. irpMajorString = "IRP_MJ_QUERY_INFORMATION";
  131. break;
  132. case IRP_MJ_SET_INFORMATION:
  133. irpMajorString = "IRP_MJ_SET_INFORMATION";
  134. break;
  135. case IRP_MJ_QUERY_EA:
  136. irpMajorString = "IRP_MJ_QUERY_EA";
  137. break;
  138. case IRP_MJ_SET_EA:
  139. irpMajorString = "IRP_MJ_SET_EA";
  140. break;
  141. case IRP_MJ_FLUSH_BUFFERS:
  142. irpMajorString = "IRP_MJ_FLUSH_BUFFERS";
  143. break;
  144. case IRP_MJ_QUERY_VOLUME_INFORMATION:
  145. irpMajorString = "IRP_MJ_QUERY_VOLUME_INFORMATION";
  146. break;
  147. case IRP_MJ_SET_VOLUME_INFORMATION:
  148. irpMajorString = "IRP_MJ_SET_VOLUME_INFORMATION";
  149. break;
  150. case IRP_MJ_DIRECTORY_CONTROL:
  151. irpMajorString = "IRP_MJ_DIRECTORY_CONTROL";
  152. switch (MinorCode) {
  153. case IRP_MN_QUERY_DIRECTORY:
  154. irpMinorString = "IRP_MN_QUERY_DIRECTORY";
  155. break;
  156. case IRP_MN_NOTIFY_CHANGE_DIRECTORY:
  157. irpMinorString = "IRP_MN_NOTIFY_CHANGE_DIRECTORY";
  158. break;
  159. default:
  160. sprintf(nameBuf,UnknownIrpMinor,MinorCode);
  161. irpMinorString = nameBuf;
  162. }
  163. break;
  164. case IRP_MJ_FILE_SYSTEM_CONTROL:
  165. irpMajorString = "IRP_MJ_FILE_SYSTEM_CONTROL";
  166. switch (MinorCode) {
  167. case IRP_MN_USER_FS_REQUEST:
  168. switch (FsctlCode) {
  169. case FSCTL_REQUEST_OPLOCK_LEVEL_1:
  170. irpMinorString = "FSCTL_REQUEST_OPLOCK_LEVEL_1";
  171. break;
  172. case FSCTL_REQUEST_OPLOCK_LEVEL_2:
  173. irpMinorString = "FSCTL_REQUEST_OPLOCK_LEVEL_2";
  174. break;
  175. case FSCTL_REQUEST_BATCH_OPLOCK:
  176. irpMinorString = "FSCTL_REQUEST_BATCH_OPLOCK";
  177. break;
  178. case FSCTL_OPLOCK_BREAK_ACKNOWLEDGE:
  179. irpMinorString = "FSCTL_OPLOCK_BREAK_ACKNOWLEDGE";
  180. break;
  181. case FSCTL_OPBATCH_ACK_CLOSE_PENDING:
  182. irpMinorString = "FSCTL_OPBATCH_ACK_CLOSE_PENDING";
  183. break;
  184. case FSCTL_OPLOCK_BREAK_NOTIFY:
  185. irpMinorString = "FSCTL_OPLOCK_BREAK_NOTIFY";
  186. break;
  187. case FSCTL_LOCK_VOLUME:
  188. irpMinorString = "FSCTL_LOCK_VOLUME";
  189. break;
  190. case FSCTL_UNLOCK_VOLUME:
  191. irpMinorString = "FSCTL_UNLOCK_VOLUME";
  192. break;
  193. case FSCTL_DISMOUNT_VOLUME:
  194. irpMinorString = "FSCTL_DISMOUNT_VOLUME";
  195. break;
  196. case FSCTL_IS_VOLUME_MOUNTED:
  197. irpMinorString = "FSCTL_IS_VOLUME_MOUNTED";
  198. break;
  199. case FSCTL_IS_PATHNAME_VALID:
  200. irpMinorString = "FSCTL_IS_PATHNAME_VALID";
  201. break;
  202. case FSCTL_MARK_VOLUME_DIRTY:
  203. irpMinorString = "FSCTL_MARK_VOLUME_DIRTY";
  204. break;
  205. case FSCTL_QUERY_RETRIEVAL_POINTERS:
  206. irpMinorString = "FSCTL_QUERY_RETRIEVAL_POINTERS";
  207. break;
  208. case FSCTL_GET_COMPRESSION:
  209. irpMinorString = "FSCTL_GET_COMPRESSION";
  210. break;
  211. case FSCTL_SET_COMPRESSION:
  212. irpMinorString = "FSCTL_SET_COMPRESSION";
  213. break;
  214. case FSCTL_MARK_AS_SYSTEM_HIVE:
  215. irpMinorString = "FSCTL_MARK_AS_SYSTEM_HIVE";
  216. break;
  217. case FSCTL_OPLOCK_BREAK_ACK_NO_2:
  218. irpMinorString = "FSCTL_OPLOCK_BREAK_ACK_NO_2";
  219. break;
  220. case FSCTL_INVALIDATE_VOLUMES:
  221. irpMinorString = "FSCTL_INVALIDATE_VOLUMES";
  222. break;
  223. case FSCTL_QUERY_FAT_BPB:
  224. irpMinorString = "FSCTL_QUERY_FAT_BPB";
  225. break;
  226. case FSCTL_REQUEST_FILTER_OPLOCK:
  227. irpMinorString = "FSCTL_REQUEST_FILTER_OPLOCK";
  228. break;
  229. case FSCTL_FILESYSTEM_GET_STATISTICS:
  230. irpMinorString = "FSCTL_FILESYSTEM_GET_STATISTICS";
  231. break;
  232. case FSCTL_GET_NTFS_VOLUME_DATA:
  233. irpMinorString = "FSCTL_GET_NTFS_VOLUME_DATA";
  234. break;
  235. case FSCTL_GET_NTFS_FILE_RECORD:
  236. irpMinorString = "FSCTL_GET_NTFS_FILE_RECORD";
  237. break;
  238. case FSCTL_GET_VOLUME_BITMAP:
  239. irpMinorString = "FSCTL_GET_VOLUME_BITMAP";
  240. break;
  241. case FSCTL_GET_RETRIEVAL_POINTERS:
  242. irpMinorString = "FSCTL_GET_RETRIEVAL_POINTERS";
  243. break;
  244. case FSCTL_MOVE_FILE:
  245. irpMinorString = "FSCTL_MOVE_FILE";
  246. break;
  247. case FSCTL_IS_VOLUME_DIRTY:
  248. irpMinorString = "FSCTL_IS_VOLUME_DIRTY";
  249. break;
  250. case FSCTL_ALLOW_EXTENDED_DASD_IO:
  251. irpMinorString = "FSCTL_ALLOW_EXTENDED_DASD_IO";
  252. break;
  253. case FSCTL_FIND_FILES_BY_SID:
  254. irpMinorString = "FSCTL_FIND_FILES_BY_SID";
  255. break;
  256. case FSCTL_SET_OBJECT_ID:
  257. irpMinorString = "FSCTL_SET_OBJECT_ID";
  258. break;
  259. case FSCTL_GET_OBJECT_ID:
  260. irpMinorString = "FSCTL_GET_OBJECT_ID";
  261. break;
  262. case FSCTL_DELETE_OBJECT_ID:
  263. irpMinorString = "FSCTL_DELETE_OBJECT_ID";
  264. break;
  265. case FSCTL_SET_REPARSE_POINT:
  266. irpMinorString = "FSCTL_SET_REPARSE_POINT";
  267. break;
  268. case FSCTL_GET_REPARSE_POINT:
  269. irpMinorString = "FSCTL_GET_REPARSE_POINT";
  270. break;
  271. case FSCTL_DELETE_REPARSE_POINT:
  272. irpMinorString = "FSCTL_DELETE_REPARSE_POINT";
  273. break;
  274. case FSCTL_ENUM_USN_DATA:
  275. irpMinorString = "FSCTL_ENUM_USN_DATA";
  276. break;
  277. case FSCTL_SECURITY_ID_CHECK:
  278. irpMinorString = "FSCTL_SECURITY_ID_CHECK";
  279. break;
  280. case FSCTL_READ_USN_JOURNAL:
  281. irpMinorString = "FSCTL_READ_USN_JOURNAL";
  282. break;
  283. case FSCTL_SET_OBJECT_ID_EXTENDED:
  284. irpMinorString = "FSCTL_SET_OBJECT_ID_EXTENDED";
  285. break;
  286. case FSCTL_CREATE_OR_GET_OBJECT_ID:
  287. irpMinorString = "FSCTL_CREATE_OR_GET_OBJECT_ID";
  288. break;
  289. case FSCTL_SET_SPARSE:
  290. irpMinorString = "FSCTL_SET_SPARSE";
  291. break;
  292. case FSCTL_SET_ZERO_DATA:
  293. irpMinorString = "FSCTL_SET_ZERO_DATA";
  294. break;
  295. case FSCTL_QUERY_ALLOCATED_RANGES:
  296. irpMinorString = "FSCTL_QUERY_ALLOCATED_RANGES";
  297. break;
  298. case FSCTL_SET_ENCRYPTION:
  299. irpMinorString = "FSCTL_SET_ENCRYPTION";
  300. break;
  301. case FSCTL_ENCRYPTION_FSCTL_IO:
  302. irpMinorString = "FSCTL_ENCRYPTION_FSCTL_IO";
  303. break;
  304. case FSCTL_WRITE_RAW_ENCRYPTED:
  305. irpMinorString = "FSCTL_WRITE_RAW_ENCRYPTED";
  306. break;
  307. case FSCTL_READ_RAW_ENCRYPTED:
  308. irpMinorString = "FSCTL_READ_RAW_ENCRYPTED";
  309. break;
  310. case FSCTL_CREATE_USN_JOURNAL:
  311. irpMinorString = "FSCTL_CREATE_USN_JOURNAL";
  312. break;
  313. case FSCTL_READ_FILE_USN_DATA:
  314. irpMinorString = "FSCTL_READ_FILE_USN_DATA";
  315. break;
  316. case FSCTL_WRITE_USN_CLOSE_RECORD:
  317. irpMinorString = "FSCTL_WRITE_USN_CLOSE_RECORD";
  318. break;
  319. case FSCTL_EXTEND_VOLUME:
  320. irpMinorString = "FSCTL_EXTEND_VOLUME";
  321. break;
  322. case FSCTL_QUERY_USN_JOURNAL:
  323. irpMinorString = "FSCTL_QUERY_USN_JOURNAL";
  324. break;
  325. case FSCTL_DELETE_USN_JOURNAL:
  326. irpMinorString = "FSCTL_DELETE_USN_JOURNAL";
  327. break;
  328. case FSCTL_MARK_HANDLE:
  329. irpMinorString = "FSCTL_MARK_HANDLE";
  330. break;
  331. case FSCTL_SIS_COPYFILE:
  332. irpMinorString = "FSCTL_SIS_COPYFILE";
  333. break;
  334. case FSCTL_SIS_LINK_FILES:
  335. irpMinorString = "FSCTL_SIS_LINK_FILES";
  336. break;
  337. case FSCTL_HSM_MSG:
  338. irpMinorString = "FSCTL_HSM_MSG";
  339. break;
  340. case FSCTL_HSM_DATA:
  341. irpMinorString = "FSCTL_HSM_DATA";
  342. break;
  343. case FSCTL_RECALL_FILE:
  344. irpMinorString = "FSCTL_RECALL_FILE";
  345. break;
  346. case FSCTL_READ_FROM_PLEX:
  347. irpMinorString = "FSCTL_READ_FROM_PLEX";
  348. break;
  349. case FSCTL_FILE_PREFETCH:
  350. irpMinorString = "FSCTL_FILE_PREFETCH";
  351. break;
  352. default:
  353. sprintf(nameBuf,"Unknown FSCTL (%u)",MinorCode);
  354. irpMinorString = nameBuf;
  355. break;
  356. }
  357. sprintf(nameBuf,"%s (USER)",irpMinorString);
  358. irpMinorString = nameBuf;
  359. break;
  360. case IRP_MN_MOUNT_VOLUME:
  361. irpMinorString = "IRP_MN_MOUNT_VOLUME";
  362. break;
  363. case IRP_MN_VERIFY_VOLUME:
  364. irpMinorString = "IRP_MN_VERIFY_VOLUME";
  365. break;
  366. case IRP_MN_LOAD_FILE_SYSTEM:
  367. irpMinorString = "IRP_MN_LOAD_FILE_SYSTEM";
  368. break;
  369. case IRP_MN_TRACK_LINK:
  370. irpMinorString = "IRP_MN_TRACK_LINK";
  371. break;
  372. default:
  373. sprintf(nameBuf,UnknownIrpMinor,MinorCode);
  374. irpMinorString = nameBuf;
  375. }
  376. break;
  377. case IRP_MJ_DEVICE_CONTROL:
  378. irpMajorString = "IRP_MJ_DEVICE_CONTROL";
  379. switch (MinorCode) {
  380. case 0:
  381. irpMinorString = "User request";
  382. break;
  383. case IRP_MN_SCSI_CLASS:
  384. irpMinorString = "IRP_MN_SCSI_CLASS";
  385. break;
  386. default:
  387. sprintf(nameBuf,UnknownIrpMinor,MinorCode);
  388. irpMinorString = nameBuf;
  389. }
  390. break;
  391. case IRP_MJ_INTERNAL_DEVICE_CONTROL:
  392. irpMajorString = "IRP_MJ_INTERNAL_DEVICE_CONTROL";
  393. break;
  394. case IRP_MJ_SHUTDOWN:
  395. irpMajorString = "IRP_MJ_SHUTDOWN";
  396. break;
  397. case IRP_MJ_LOCK_CONTROL:
  398. irpMajorString = "IRP_MJ_LOCK_CONTROL";
  399. switch (MinorCode) {
  400. case IRP_MN_LOCK:
  401. irpMinorString = "IRP_MN_LOCK";
  402. break;
  403. case IRP_MN_UNLOCK_SINGLE:
  404. irpMinorString = "IRP_MN_UNLOCK_SINGLE";
  405. break;
  406. case IRP_MN_UNLOCK_ALL:
  407. irpMinorString = "IRP_MN_UNLOCK_ALL";
  408. break;
  409. case IRP_MN_UNLOCK_ALL_BY_KEY:
  410. irpMinorString = "IRP_MN_UNLOCK_ALL_BY_KEY";
  411. break;
  412. default:
  413. sprintf(nameBuf,UnknownIrpMinor,MinorCode);
  414. irpMinorString = nameBuf;
  415. }
  416. break;
  417. case IRP_MJ_CLEANUP:
  418. irpMajorString = "IRP_MJ_CLEANUP";
  419. break;
  420. case IRP_MJ_CREATE_MAILSLOT:
  421. irpMajorString = "IRP_MJ_CREATE_MAILSLOT";
  422. break;
  423. case IRP_MJ_QUERY_SECURITY:
  424. irpMajorString = "IRP_MJ_QUERY_SECURITY";
  425. break;
  426. case IRP_MJ_SET_SECURITY:
  427. irpMajorString = "IRP_MJ_SET_SECURITY";
  428. break;
  429. case IRP_MJ_POWER:
  430. irpMajorString = "IRP_MJ_POWER";
  431. switch (MinorCode) {
  432. case IRP_MN_WAIT_WAKE:
  433. irpMinorString = "IRP_MN_WAIT_WAKE";
  434. break;
  435. case IRP_MN_POWER_SEQUENCE:
  436. irpMinorString = "IRP_MN_POWER_SEQUENCE";
  437. break;
  438. case IRP_MN_SET_POWER:
  439. irpMinorString = "IRP_MN_SET_POWER";
  440. break;
  441. case IRP_MN_QUERY_POWER:
  442. irpMinorString = "IRP_MN_QUERY_POWER";
  443. break;
  444. default :
  445. sprintf(nameBuf,UnknownIrpMinor,MinorCode);
  446. irpMinorString = nameBuf;
  447. }
  448. break;
  449. case IRP_MJ_SYSTEM_CONTROL:
  450. irpMajorString = "IRP_MJ_SYSTEM_CONTROL";
  451. switch (MinorCode) {
  452. case IRP_MN_QUERY_ALL_DATA:
  453. irpMinorString = "IRP_MN_QUERY_ALL_DATA";
  454. break;
  455. case IRP_MN_QUERY_SINGLE_INSTANCE:
  456. irpMinorString = "IRP_MN_QUERY_SINGLE_INSTANCE";
  457. break;
  458. case IRP_MN_CHANGE_SINGLE_INSTANCE:
  459. irpMinorString = "IRP_MN_CHANGE_SINGLE_INSTANCE";
  460. break;
  461. case IRP_MN_CHANGE_SINGLE_ITEM:
  462. irpMinorString = "IRP_MN_CHANGE_SINGLE_ITEM";
  463. break;
  464. case IRP_MN_ENABLE_EVENTS:
  465. irpMinorString = "IRP_MN_ENABLE_EVENTS";
  466. break;
  467. case IRP_MN_DISABLE_EVENTS:
  468. irpMinorString = "IRP_MN_DISABLE_EVENTS";
  469. break;
  470. case IRP_MN_ENABLE_COLLECTION:
  471. irpMinorString = "IRP_MN_ENABLE_COLLECTION";
  472. break;
  473. case IRP_MN_DISABLE_COLLECTION:
  474. irpMinorString = "IRP_MN_DISABLE_COLLECTION";
  475. break;
  476. case IRP_MN_REGINFO:
  477. irpMinorString = "IRP_MN_REGINFO";
  478. break;
  479. case IRP_MN_EXECUTE_METHOD:
  480. irpMinorString = "IRP_MN_EXECUTE_METHOD";
  481. break;
  482. default :
  483. sprintf(nameBuf,UnknownIrpMinor,MinorCode);
  484. irpMinorString = nameBuf;
  485. }
  486. break;
  487. case IRP_MJ_DEVICE_CHANGE:
  488. irpMajorString = "IRP_MJ_DEVICE_CHANGE";
  489. break;
  490. case IRP_MJ_QUERY_QUOTA:
  491. irpMajorString = "IRP_MJ_QUERY_QUOTA";
  492. break;
  493. case IRP_MJ_SET_QUOTA:
  494. irpMajorString = "IRP_MJ_SET_QUOTA";
  495. break;
  496. case IRP_MJ_PNP:
  497. irpMajorString = "IRP_MJ_PNP";
  498. switch (MinorCode) {
  499. case IRP_MN_START_DEVICE:
  500. irpMinorString = "IRP_MN_START_DEVICE";
  501. break;
  502. case IRP_MN_QUERY_REMOVE_DEVICE:
  503. irpMinorString = "IRP_MN_QUERY_REMOVE_DEVICE";
  504. break;
  505. case IRP_MN_REMOVE_DEVICE:
  506. irpMinorString = "IRP_MN_REMOVE_DEVICE";
  507. break;
  508. case IRP_MN_CANCEL_REMOVE_DEVICE:
  509. irpMinorString = "IRP_MN_CANCEL_REMOVE_DEVICE";
  510. break;
  511. case IRP_MN_STOP_DEVICE:
  512. irpMinorString = "IRP_MN_STOP_DEVICE";
  513. break;
  514. case IRP_MN_QUERY_STOP_DEVICE:
  515. irpMinorString = "IRP_MN_QUERY_STOP_DEVICE";
  516. break;
  517. case IRP_MN_CANCEL_STOP_DEVICE:
  518. irpMinorString = "IRP_MN_CANCEL_STOP_DEVICE";
  519. break;
  520. case IRP_MN_QUERY_DEVICE_RELATIONS:
  521. irpMinorString = "IRP_MN_QUERY_DEVICE_RELATIONS";
  522. break;
  523. case IRP_MN_QUERY_INTERFACE:
  524. irpMinorString = "IRP_MN_QUERY_INTERFACE";
  525. break;
  526. case IRP_MN_QUERY_CAPABILITIES:
  527. irpMinorString = "IRP_MN_QUERY_CAPABILITIES";
  528. break;
  529. case IRP_MN_QUERY_RESOURCES:
  530. irpMinorString = "IRP_MN_QUERY_RESOURCES";
  531. break;
  532. case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
  533. irpMinorString = "IRP_MN_QUERY_RESOURCE_REQUIREMENTS";
  534. break;
  535. case IRP_MN_QUERY_DEVICE_TEXT:
  536. irpMinorString = "IRP_MN_QUERY_DEVICE_TEXT";
  537. break;
  538. case IRP_MN_FILTER_RESOURCE_REQUIREMENTS:
  539. irpMinorString = "IRP_MN_FILTER_RESOURCE_REQUIREMENTS";
  540. break;
  541. case IRP_MN_READ_CONFIG:
  542. irpMinorString = "IRP_MN_READ_CONFIG";
  543. break;
  544. case IRP_MN_WRITE_CONFIG:
  545. irpMinorString = "IRP_MN_WRITE_CONFIG";
  546. break;
  547. case IRP_MN_EJECT:
  548. irpMinorString = "IRP_MN_EJECT";
  549. break;
  550. case IRP_MN_SET_LOCK:
  551. irpMinorString = "IRP_MN_SET_LOCK";
  552. break;
  553. case IRP_MN_QUERY_ID:
  554. irpMinorString = "IRP_MN_QUERY_ID";
  555. break;
  556. case IRP_MN_QUERY_PNP_DEVICE_STATE:
  557. irpMinorString = "IRP_MN_QUERY_PNP_DEVICE_STATE";
  558. break;
  559. case IRP_MN_QUERY_BUS_INFORMATION:
  560. irpMinorString = "IRP_MN_QUERY_BUS_INFORMATION";
  561. break;
  562. case IRP_MN_DEVICE_USAGE_NOTIFICATION:
  563. irpMinorString = "IRP_MN_DEVICE_USAGE_NOTIFICATION";
  564. break;
  565. case IRP_MN_SURPRISE_REMOVAL:
  566. irpMinorString = "IRP_MN_SURPRISE_REMOVAL";
  567. break;
  568. case IRP_MN_QUERY_LEGACY_BUS_INFORMATION:
  569. irpMinorString = "IRP_MN_QUERY_LEGACY_BUS_INFORMATION";
  570. break;
  571. default :
  572. sprintf(nameBuf,UnknownIrpMinor,MinorCode);
  573. irpMinorString = nameBuf;
  574. }
  575. break;
  576. default:
  577. sprintf(nameBuf,"Unknown Irp major code (%u)",MajorCode);
  578. irpMajorString = nameBuf;
  579. }
  580. strcpy(MajorCodeName,irpMajorString);
  581. strcpy(MinorCodeName,irpMinorString);
  582. }