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.

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