Skip to content

Instantly share code, notes, and snippets.

@kkent030315
Last active December 3, 2020 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkent030315/946f81bca400a2f7ad57ca9a013ad4f1 to your computer and use it in GitHub Desktop.
Save kkent030315/946f81bca400a2f7ad57ca9a013ad4f1 to your computer and use it in GitHub Desktop.
//
// Define the major function codes for IRPs.
//
#define IRP_MJ_CREATE 0x00
#define IRP_MJ_CREATE_NAMED_PIPE 0x01
#define IRP_MJ_CLOSE 0x02
#define IRP_MJ_READ 0x03
#define IRP_MJ_WRITE 0x04
#define IRP_MJ_QUERY_INFORMATION 0x05
#define IRP_MJ_SET_INFORMATION 0x06
#define IRP_MJ_QUERY_EA 0x07
#define IRP_MJ_SET_EA 0x08
#define IRP_MJ_FLUSH_BUFFERS 0x09
#define IRP_MJ_QUERY_VOLUME_INFORMATION 0x0a // 10
#define IRP_MJ_SET_VOLUME_INFORMATION 0x0b // 11
#define IRP_MJ_DIRECTORY_CONTROL 0x0c // 12
#define IRP_MJ_FILE_SYSTEM_CONTROL 0x0d // 13
#define IRP_MJ_DEVICE_CONTROL 0x0e // 14
#define IRP_MJ_INTERNAL_DEVICE_CONTROL 0x0f // 15
#define IRP_MJ_SHUTDOWN 0x10
#define IRP_MJ_LOCK_CONTROL 0x11
#define IRP_MJ_CLEANUP 0x12
#define IRP_MJ_CREATE_MAILSLOT 0x13
#define IRP_MJ_QUERY_SECURITY 0x14
#define IRP_MJ_SET_SECURITY 0x15
#define IRP_MJ_POWER 0x16
#define IRP_MJ_SYSTEM_CONTROL 0x17
#define IRP_MJ_DEVICE_CHANGE 0x18
#define IRP_MJ_QUERY_QUOTA 0x19
#define IRP_MJ_SET_QUOTA 0x1a
#define IRP_MJ_PNP 0x1b
#define IRP_MJ_PNP_POWER IRP_MJ_PNP // Obsolete....
#define IRP_MJ_MAXIMUM_FUNCTION 0x1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment