20 #include <DriverSpecs.h> 29 #define TIME_BUFFER_LENGTH 20 30 #define TIME_ERROR "time error" 32 #define POLL_INTERVAL 200 // 200 milliseconds 70 if (TagData->
FileTag == IO_REPARSE_TAG_MOUNT_POINT) {
83 MoveMemory( &logRecord->Name[0],
87 logRecord->Name[Length/
sizeof(WCHAR)] = UNICODE_NULL;
98 _In_ LPVOID lpParameter
119 DWORD bytesReturned = 0;
122 PCHAR buffer = (PCHAR) alignedBuffer;
130 #pragma warning(push) 131 #pragma warning(disable:4127) // conditional expression is constant 152 hResult = FilterSendMessage( context->
Port,
156 sizeof(alignedBuffer),
159 if (IS_ERROR( hResult )) {
161 if (HRESULT_FROM_WIN32( ERROR_INVALID_HANDLE ) == hResult) {
163 printf(
"The kernel component of minispy has unloaded. Exiting\n" );
167 if (hResult != HRESULT_FROM_WIN32( ERROR_NO_MORE_ITEMS )) {
169 printf(
"UNEXPECTED ERROR received: %x\n", hResult );
193 if (used+FIELD_OFFSET(
LOG_RECORD,Name) > bytesReturned) {
200 printf(
"UNEXPECTED LOG_RECORD->Length: length=%d expected>=%d\n",
207 used += pLogRecord->
Length;
209 if (used > bytesReturned) {
211 printf(
"UNEXPECTED LOG_RECORD size: used=%d bytesReturned=%d\n",
218 pRecordData = &pLogRecord->
Data;
226 if (!TranslateFileTag( pLogRecord )){
262 printf(
"M: %08X System Out of Memory\n",
269 "M:\t0x%08X\tSystem Out of Memory\n",
277 printf(
"M: %08X Exceeded Mamimum Allowed Memory Buffers\n",
284 "M:\t0x%08X\tExceeded Mamimum Allowed Memory Buffers\n",
300 if (bytesReturned == 0) {
306 printf(
"Log: Shutting down\n" );
308 printf(
"Log: All done\n" );
315 _In_ UCHAR MajorCode,
316 _In_ UCHAR MinorCode,
317 _In_opt_ FILE *OutputFile,
318 _In_ BOOLEAN PrintMajorCode
344 CHAR *irpMajorString, *irpMinorString =
NULL;
385 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp minor code (%u)",MinorCode);
386 irpMinorString = errorBuf;
418 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp minor code (%u)",MinorCode);
419 irpMinorString = errorBuf;
454 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp minor code (%u)",MinorCode);
455 irpMinorString = errorBuf;
478 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp minor code (%u)",MinorCode);
479 irpMinorString = errorBuf;
490 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp minor code (%u)",MinorCode);
491 irpMinorString = errorBuf;
517 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp minor code (%u)",MinorCode);
518 irpMinorString = errorBuf;
550 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp minor code (%u)",MinorCode);
551 irpMinorString = errorBuf;
589 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp minor code (%u)",MinorCode);
590 irpMinorString = errorBuf;
679 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp minor code (%u)",MinorCode);
680 irpMinorString = errorBuf;
811 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Transaction notication code (%u)",MinorCode);
812 irpMinorString = errorBuf;
818 sprintf_s(errorBuf,
sizeof(errorBuf),
"Unknown Irp major function (%d)",MajorCode);
819 irpMajorString = errorBuf;
825 if (irpMinorString) {
827 fprintf(OutputFile,
"\t%-35s\t%-35s", irpMajorString, irpMinorString);
831 fprintf(OutputFile,
"\t%-35s\t ", irpMajorString);
836 if (PrintMajorCode) {
838 printf(
"%-35s ", irpMajorString);
842 if (irpMinorString) {
854 _In_ SYSTEMTIME *SystemTime,
856 _In_ ULONG BufferLength
878 ULONG returnLength = 0;
889 returnLength = sprintf_s( Buffer,
891 "%02d:%02d:%02d:%03d",
895 SystemTime->wMilliseconds );
903 _In_ ULONG SequenceNumber,
904 _In_ WCHAR CONST *Name,
933 SYSTEMTIME systemTime;
935 static BOOLEAN didFileHeader = FALSE;
941 if (!didFileHeader) {
944 fprintf( File,
"Opr\t SeqNum \t PreOp Time \tPostOp Time \t Process.Thrd\t Major Operation \t Minor Operation \t IrpFlags \t DevObj \t FileObj \t Transactn \t status:inform \t Arg 1 \t Arg 2 \t Arg 3 \t Arg 4 \t Arg 5 \t Arg 6 \tName\n");
945 fprintf( File,
"---\t----------\t------------\t------------\t-------------\t-----------------------------------\t-----------------------------------\t---------------\t------------------\t------------------\t------------------\t-----------------------------\t------------------\t------------------\t------------------\t------------------\t------------------\t----------\t--------------------------------------------------\n");
947 fprintf( File,
"Opr\t SeqNum \t PreOp Time \tPostOp Time \t Process.Thrd\t Major Operation \t Minor Operation \t IrpFlags \t DevObj \t FileObj \tTransactn \t status:inform \t Arg 1 \t Arg 2 \t Arg 3 \t Arg 4 \t Arg 5 \t Arg 6 \tName\n");
948 fprintf( File,
"---\t----------\t------------\t------------\t-------------\t-----------------------------------\t-----------------------------------\t---------------\t----------\t----------\t----------\t---------------------\t----------\t----------\t----------\t----------\t----------\t----------\t--------------------------------------------------\n");
950 didFileHeader =
TRUE;
959 fprintf( File,
"IRP");
963 fprintf( File,
"FIO");
967 fprintf( File,
"FSF");
971 fprintf( File,
"ERR");
978 fprintf( File,
"\t0x%08X", SequenceNumber );
984 FileTimeToLocalFileTime( (FILETIME *)&(RecordData->OriginatingTime),
986 FileTimeToSystemTime( &localTime,
991 fprintf( File,
"\t%-12s", time );
1002 FileTimeToLocalFileTime( (FILETIME *)&(RecordData->CompletionTime),
1004 FileTimeToSystemTime( &localTime,
1009 fprintf( File,
"\t%-12s", time );
1016 fprintf(File,
"\t%8Ix.%-4Ix ", RecordData->ProcessId, RecordData->ThreadId);
1019 RecordData->CallbackMinorId,
1027 fprintf( File,
"\t0x%08lx ", RecordData->IrpFlags );
1028 fprintf( File,
"%s", (RecordData->IrpFlags &
IRP_NOCACHE) ?
"N":
"-" );
1029 fprintf( File,
"%s", (RecordData->IrpFlags &
IRP_PAGING_IO) ?
"P":
"-" );
1033 fprintf( File,
"\t0x%08p", (PVOID) RecordData->DeviceObject );
1034 fprintf( File,
"\t0x%08p", (PVOID) RecordData->FileObject );
1035 fprintf( File,
"\t0x%08p", (PVOID) RecordData->Transaction );
1036 fprintf( File,
"\t0x%08lx:0x%p", RecordData->Status, (PVOID)RecordData->Information );
1038 fprintf( File,
"\t0x%p", RecordData->Arg1 );
1039 fprintf( File,
"\t0x%p", RecordData->Arg2 );
1040 fprintf( File,
"\t0x%p", RecordData->Arg3 );
1041 fprintf( File,
"\t0x%p", RecordData->Arg4 );
1042 fprintf( File,
"\t0x%p", RecordData->Arg5 );
1043 fprintf( File,
"\t0x%08I64x", RecordData->Arg6.QuadPart );
1045 fprintf( File,
"\t%S", Name );
1046 fprintf( File,
"\n" );
1052 _In_ ULONG SequenceNumber,
1053 _In_ WCHAR CONST *Name,
1077 SYSTEMTIME systemTime;
1079 static BOOLEAN didScreenHeader = FALSE;
1085 if (!didScreenHeader) {
1088 printf(
"Opr SeqNum PreOp Time PostOp Time Process.Thrd Major/Minor Operation IrpFlags DevObj FileObj Transact status:inform Arguments Name\n");
1089 printf(
"--- -------- ------------ ------------ ------------- ----------------------------------- ------------- ---------------- ---------------- ---------------- ------------------------- --------------------------------------------------------------------------------------------------------- -----------------------------------\n");
1091 printf(
"Opr SeqNum PreOp Time PostOp Time Process.Thrd Major/Minor Operation IrpFlags DevObj FileObj Transact status:inform Arguments Name\n");
1092 printf(
"--- -------- ------------ ------------ ------------- ----------------------------------- ------------- -------- -------- -------- ----------------- ----------------------------------------------------------------- -----------------------------------\n");
1094 didScreenHeader =
TRUE;
1117 printf(
"%08X ", SequenceNumber );
1124 FileTimeToLocalFileTime( (FILETIME *)&(RecordData->OriginatingTime),
1126 FileTimeToSystemTime( &localTime,
1131 printf(
"%-12s ", time );
1142 FileTimeToLocalFileTime( (FILETIME *)&(RecordData->CompletionTime),
1144 FileTimeToSystemTime( &localTime,
1149 printf(
"%-12s ", time );
1156 printf(
"%8Ix.%-4Ix ", RecordData->ProcessId, RecordData->ThreadId);
1159 RecordData->CallbackMinorId,
1167 printf(
"%08lx ", RecordData->IrpFlags );
1168 printf(
"%s", (RecordData->IrpFlags &
IRP_NOCACHE) ?
"N":
"-" );
1169 printf(
"%s", (RecordData->IrpFlags &
IRP_PAGING_IO) ?
"P":
"-" );
1173 printf(
"%08p ", (PVOID) RecordData->DeviceObject );
1174 printf(
"%08p ", (PVOID) RecordData->FileObject );
1175 printf(
"%08p ", (PVOID) RecordData->Transaction );
1176 printf(
"%08lx:%p ", RecordData->Status, (PVOID)RecordData->Information );
1178 printf(
"1:%p 2:%p 3:%p 4:%p 5:%p 6:%08I64x ",
1184 RecordData->Arg6.QuadPart );
1186 printf(
"%S", Name );
1189 RecordData->CallbackMinorId,
#define IRP_MN_UNLOCK_ALL_STRING
#define IRP_MJ_WRITE_STRING
#define IRP_MN_UNLOCK_SINGLE_STRING
#define IRP_MJ_SET_VOLUME_INFORMATION_STRING
#define IRP_MN_UNLOCK_SINGLE
#define IRP_MN_NORMAL_STRING
#define IRP_MN_DISABLE_EVENTS_STRING
#define IRP_MJ_MDL_WRITE_COMPLETE_STRING
#define TRANSACTION_NOTIFY_PREPREPARE_COMPLETE_STRING
#define TRANSACTION_NOTIFY_RECOVER_QUERY_STRING
#define IRP_MN_UNLOCK_ALL_BY_KEY
#define FLT_CALLBACK_DATA_FAST_IO_OPERATION
#define IRP_MN_ENABLE_COLLECTION_STRING
#define IRP_MN_USER_FS_REQUEST
_In_ PLARGE_INTEGER _In_ ULONG Length
#define IRP_MN_QUERY_DEVICE_RELATIONS_STRING
#define IRP_MJ_DEVICE_CONTROL_STRING
#define TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT_STRING
#define IRP_MN_COMPLETE_MDL
#define IRP_MN_EJECT_STRING
#define IRP_MJ_MDL_WRITE_COMPLETE
#define IRP_MN_QUERY_SINGLE_INSTANCE_STRING
#define TRANSACTION_NOTIFY_ENLIST_MASK_STRING
#define TRANSACTION_NOTIFY_PREPARE_STRING
#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS_STRING
#define IRP_MN_QUERY_ID_STRING
#define IRP_MN_ENABLE_EVENTS
#define IRP_MN_CHANGE_SINGLE_INSTANCE
#define IRP_MN_QUERY_STOP_DEVICE_STRING
#define IRP_MJ_RELEASE_FOR_SECTION_SYNCHRONIZATION_STRING
#define IRP_MJ_ACQUIRE_FOR_CC_FLUSH
#define IRP_MN_STOP_DEVICE_STRING
#define IRP_MN_QUERY_REMOVE_DEVICE_STRING
#define TRANSACTION_NOTIFY_PROPAGATE_PUSH_STRING
#define IRP_MJ_RELEASE_FOR_SECTION_SYNCHRONIZATION
#define IRP_MJ_MDL_READ_STRING
#define IRP_MN_POWER_SEQUENCE
#define IRP_MN_QUERY_REMOVE_DEVICE
#define IRP_MN_QUERY_INTERFACE
#define IRP_MN_QUERY_SINGLE_INSTANCE
#define IRP_MN_QUERY_DEVICE_TEXT
#define IRP_SYNCHRONOUS_PAGING_IO
#define TRANSACTION_NOTIFY_DELEGATE_COMMIT_STRING
#define IRP_MJ_DEVICE_CONTROL
#define IRP_MN_COMPLETE_STRING
#define IRP_MN_POWER_SEQUENCE_STRING
#define IRP_MJ_VOLUME_MOUNT_STRING
#define IRP_MN_READ_CONFIG_STRING
#define IRP_MN_REMOVE_DEVICE_STRING
#define IRP_MJ_VOLUME_DISMOUNT_STRING
#define IRP_MN_START_DEVICE
#define IRP_MJ_QUERY_QUOTA
#define IRP_MJ_CLOSE_STRING
#define IRP_MN_COMPLETE_MDL_DPC
#define IRP_MJ_NETWORK_QUERY_OPEN
#define IRP_MJ_SET_VOLUME_INFORMATION
#define FLT_CALLBACK_DATA_FS_FILTER_OPERATION
#define IRP_MN_UNLOCK_ALL_BY_KEY_STRING
#define IRP_MN_REGINFO_STRING
#define IRP_MN_SCSI_CLASS_STRING
DWORD WINAPI RetrieveLogRecords(_In_ LPVOID lpParameter)
#define RECORD_TYPE_FILETAG
#define IRP_MN_QUERY_DEVICE_RELATIONS
VOID FileDump(_In_ ULONG SequenceNumber, _In_ WCHAR CONST *Name, _In_ PRECORD_DATA RecordData, _In_ FILE *File)
#define IRP_MN_NOTIFY_CHANGE_DIRECTORY
#define IRP_MN_CHANGE_SINGLE_ITEM
#define IRP_MJ_ACQUIRE_FOR_CC_FLUSH_STRING
#define IRP_MJ_QUERY_INFORMATION
#define IRP_MJ_SYSTEM_CONTROL
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
#define IRP_MN_QUERY_PNP_DEVICE_STATE_STRING
#define IRP_MJ_RELEASE_FOR_MOD_WRITE_STRING
#define IRP_MJ_SET_SECURITY
#define IRP_MN_QUERY_LEGACY_BUS_INFORMATION
#define TRANSACTION_NOTIFY_COMMIT_FINALIZE_STRING
#define IRP_MJ_RELEASE_FOR_CC_FLUSH
#define IRP_MN_QUERY_ALL_DATA
#define IRP_MJ_CREATE_MAILSLOT
#define IRP_MN_QUERY_BUS_INFORMATION
#define IRP_MJ_CREATE_NAMED_PIPE_STRING
#define IRP_MN_QUERY_ALL_DATA_STRING
#define IRP_MJ_QUERY_VOLUME_INFORMATION_STRING
#define IRP_MN_UNLOCK_ALL
#define IRP_MJ_SET_SECURITY_STRING
#define IRP_MN_WRITE_CONFIG
#define IRP_MN_VERIFY_VOLUME
#define IRP_MJ_FILE_SYSTEM_CONTROL_STRING
#define RECORD_TYPE_FLAG_EXCEED_MEMORY_ALLOWANCE
#define IRP_MN_QUERY_INTERFACE_STRING
#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS
#define TRANSACTION_NOTIFY_INDOUBT_STRING
#define IRP_MN_QUERY_DIRECTORY_STRING
#define IRP_MN_LOCK_STRING
#define IRP_MN_EXECUTE_METHOD_STRING
#define IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION
#define IRP_MJ_LOCK_CONTROL
#define IRP_MN_SET_POWER_STRING
#define IRP_MJ_INTERNAL_DEVICE_CONTROL_STRING
struct _LOG_CONTEXT * PLOG_CONTEXT
#define IRP_MN_SET_LOCK_STRING
#define IRP_MN_MOUNT_VOLUME_STRING
#define IRP_MJ_DIRECTORY_CONTROL_STRING
#define IRP_MJ_TRANSACTION_NOTIFY_STRING
#define IRP_MN_QUERY_POWER_STRING
#define IRP_MJ_FAST_IO_CHECK_IF_POSSIBLE_STRING
#define IRP_MN_WRITE_CONFIG_STRING
#define IRP_MN_DISABLE_COLLECTION_STRING
#define IRP_MN_DISABLE_COLLECTION
_In_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _Out_writes_bytes_(Length)
#define IRP_MN_STOP_DEVICE
_In_ BOOLEAN _Out_ PFILE_BASIC_INFORMATION Buffer
#define IRP_MJ_SYSTEM_CONTROL_STRING
#define IRP_MN_CANCEL_STOP_DEVICE_STRING
#define IRP_MJ_SET_INFORMATION
#define IRP_MJ_SET_EA_STRING
_Analysis_mode_(_Analysis_code_type_user_code_)
#define IRP_MJ_LOCK_CONTROL_STRING
#define IRP_MN_NOTIFY_CHANGE_DIRECTORY_STRING
#define IRP_MN_COMPRESSED
#define IRP_MJ_SET_QUOTA_STRING
#define TRANSACTION_NOTIFY_ROLLBACK_COMPLETE_STRING
#define IRP_MN_FILTER_RESOURCE_REQUIREMENTS_STRING
#define IRP_MJ_CREATE_STRING
#define TRANSACTION_NOTIFY_PROPAGATE_PULL_STRING
#define IRP_MN_CANCEL_REMOVE_DEVICE_STRING
#define IRP_MJ_DEVICE_CHANGE_STRING
NcLoadRegistryStringRetry NULL
#define TRANSACTION_NOTIFY_ROLLBACK_STRING
#define IRP_MN_TRACK_LINK_STRING
#define TRANSACTION_NOTIFY_LAST_RECOVER_STRING
#define TRANSACTION_NOTIFY_PREPREPARE_STRING
ULONG FormatSystemTime(_In_ SYSTEMTIME *SystemTime, _Out_writes_bytes_(BufferLength) CHAR *Buffer, _In_ ULONG BufferLength)
#define IRP_MN_QUERY_STOP_DEVICE
#define IRP_MJ_ACQUIRE_FOR_MOD_WRITE
VOID PrintIrpCode(_In_ UCHAR MajorCode, _In_ UCHAR MinorCode, _In_opt_ FILE *OutputFile, _In_ BOOLEAN PrintMajorCode)
#define IRP_MN_CANCEL_STOP_DEVICE
#define IRP_MN_QUERY_RESOURCES
#define IRP_MJ_RELEASE_FOR_MOD_WRITE
#define IRP_MJ_QUERY_SECURITY_STRING
#define IRP_MN_QUERY_CAPABILITIES
#define IRP_MN_QUERY_POWER
#define IRP_MJ_VOLUME_DISMOUNT
#define IRP_MN_CHANGE_SINGLE_INSTANCE_STRING
#define TRANSACTION_NOTIFY_MARSHAL_STRING
#define IRP_MN_CHANGE_SINGLE_ITEM_STRING
#define TRANSACTION_NOTIFY_RECOVER_STRING
struct _FLT_TAG_DATA_BUFFER * PFLT_TAG_DATA_BUFFER
#define IRP_MN_READ_CONFIG
#define IRP_MN_QUERY_DEVICE_TEXT_STRING
#define TRANSACTION_NOTIFY_ENLIST_PREPREPARE_STRING
#define IRP_MN_USER_FS_REQUEST_STRING
#define IRP_MJ_CREATE_MAILSLOT_STRING
#define IRP_MN_SURPRISE_REMOVAL
#define IRP_MN_DISABLE_EVENTS
#define IRP_MJ_SHUTDOWN_STRING
#define IRP_MJ_READ_STRING
#define IRP_MN_REMOVE_DEVICE
#define IRP_MN_COMPRESSED_STRING
#define IRP_MN_MOUNT_VOLUME
#define IRP_MN_DPC_STRING
#define IRP_MJ_FILE_SYSTEM_CONTROL
#define IRP_MN_QUERY_DIRECTORY
#define IRP_MJ_NOTIFY_STREAM_FO_CREATION
#define IRP_MJ_QUERY_EA_STRING
#define IRP_MN_QUERY_BUS_INFORMATION_STRING
#define IRP_MN_TRACK_LINK
#define IRP_MN_QUERY_LEGACY_BUS_INFORMATION_STRING
if(Status !=STATUS_BUFFER_TOO_SMALL &&Status !=STATUS_BUFFER_OVERFLOW)
#define IRP_MJ_FLUSH_BUFFERS_STRING
#define IRP_MJ_DIRECTORY_CONTROL
#define FLT_CALLBACK_DATA_IRP_OPERATION
#define IRP_MN_START_DEVICE_STRING
#define IRP_MN_MDL_STRING
#define IRP_MJ_FAST_IO_CHECK_IF_POSSIBLE
#define IRP_MJ_PREPARE_MDL_WRITE
#define IRP_MJ_NOTIFY_STREAM_FO_CREATION_STRING
#define IRP_MJ_MDL_READ_COMPLETE_STRING
#define IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION_STRING
#define IRP_MJ_TRANSACTION_NOTIFY
#define IRP_MJ_QUERY_SECURITY
#define IRP_MN_QUERY_PNP_DEVICE_STATE
#define TRANSACTION_NOTIFY_COMMIT_COMPLETE_STRING
struct _LOG_RECORD * PLOG_RECORD
#define IRP_MJ_RELEASE_FOR_CC_FLUSH_STRING
#define IRP_MN_ENABLE_EVENTS_STRING
#define IRP_MJ_QUERY_INFORMATION_STRING
#define IRP_MJ_VOLUME_MOUNT
#define IRP_MN_SURPRISE_REMOVAL_STRING
#define IRP_MJ_ACQUIRE_FOR_MOD_WRITE_STRING
#define IRP_MN_LOAD_FILE_SYSTEM
VOID ScreenDump(_In_ ULONG SequenceNumber, _In_ WCHAR CONST *Name, _In_ PRECORD_DATA RecordData)
#define IRP_MN_DEVICE_USAGE_NOTIFICATION_STRING
#define IRP_MJ_NETWORK_QUERY_OPEN_STRING
#define IRP_MJ_PNP_STRING
struct _FLT_TAG_DATA_BUFFER::@5::@8 MountPointReparseBuffer
#define IRP_MN_QUERY_RESOURCES_STRING
#define IRP_MJ_CLEANUP_STRING
#define IRP_MN_SCSI_CLASS
#define IRP_MN_EXECUTE_METHOD
#define IRP_MN_DEVICE_USAGE_NOTIFICATION
#define TIME_BUFFER_LENGTH
#define IRP_MJ_QUERY_QUOTA_STRING
#define IRP_SYNCHRONOUS_API
#define IRP_MJ_FLUSH_BUFFERS
#define IRP_MJ_MDL_READ_COMPLETE
#define IRP_MJ_PREPARE_MDL_WRITE_STRING
#define IRP_MN_QUERY_CAPABILITIES_STRING
#define TRANSACTION_NOTIFY_COMMIT_STRING
#define IRP_MN_VERIFY_VOLUME_STRING
#define IRP_MJ_DEVICE_CHANGE
#define IRP_MN_FILTER_RESOURCE_REQUIREMENTS
#define IRP_MJ_POWER_STRING
#define IRP_MN_ENABLE_COLLECTION
#define IRP_MJ_SET_INFORMATION_STRING
#define IRP_MN_WAIT_WAKE_STRING
#define IRP_MN_COMPLETE_MDL_DPC_STRING
#define RECORD_TYPE_FLAG_OUT_OF_MEMORY
#define IRP_MN_LOAD_FILE_SYSTEM_STRING
#define TRANSACTION_BEGIN
#define IRP_MJ_QUERY_VOLUME_INFORMATION
#define IRP_MN_MDL_DPC_STRING
#define IRP_MJ_CREATE_NAMED_PIPE
#define IRP_MN_CANCEL_REMOVE_DEVICE
#define IRP_MN_COMPLETE_MDL_STRING