std::string MiniFilter::Get_IOTCL_FunctionName(ULONG64 Index)
{
std::string funciton_name;
switch (Index)
{
case
0
:
funciton_name
=
"IRP_MJ_CREATE"
;
break
;
case
1
:
funciton_name
=
"IRP_MJ_CREATE_NAMED_PIPE"
;
break
;
case
2
:
funciton_name
=
"IRP_MJ_CLOSE"
;
break
;
case
3
:
funciton_name
=
"IRP_MJ_READ"
;
break
;
case
4
:
funciton_name
=
"IRP_MJ_WRITE"
;
break
;
case
5
:
funciton_name
=
"IRP_MJ_QUERY_INFORMATION"
;
break
;
case
6
:
funciton_name
=
"IRP_MJ_SET_INFORMATION"
;
break
;
case
7
:
funciton_name
=
"IRP_MJ_QUERY_EA"
;
break
;
case
8
:
funciton_name
=
"IRP_MJ_SET_EA"
;
break
;
case
9
:
funciton_name
=
"IRP_MJ_FLUSH_BUFFERS"
;
break
;
case
10
:
funciton_name
=
"IRP_MJ_QUERY_VOLUME_INFORMATION"
;
break
;
case
11
:
funciton_name
=
"IRP_MJ_SET_VOLUME_INFORMATION"
;
break
;
case
12
:
funciton_name
=
"IRP_MJ_DIRECTORY_CONTROL"
;
break
;
case
13
:
funciton_name
=
"IRP_MJ_FILE_SYSTEM_CONTROL"
;
break
;
case
14
:
funciton_name
=
"IRP_MJ_DEVICE_CONTROL"
;
break
;
case
15
:
funciton_name
=
"IRP_MJ_INTERNAL_DEVICE_CONTROL"
;
break
;
case
16
:
funciton_name
=
"IRP_MJ_SHUTDOWN"
;
break
;
case
17
:
funciton_name
=
"IRP_MJ_LOCK_CONTROL"
;
break
;
case
18
:
funciton_name
=
"IRP_MJ_CLEANUP"
;
break
;
case
19
:
funciton_name
=
"IRP_MJ_CREATE_MAILSLOT"
;
break
;
case
20
:
funciton_name
=
"IRP_MJ_QUERY_SECURITY"
;
break
;
case
21
:
funciton_name
=
"IRP_MJ_SET_SECURITY"
;
break
;
case
22
:
funciton_name
=
"IRP_MJ_POWER"
;
break
;
case
23
:
funciton_name
=
"IRP_MJ_SYSTEM_CONTROL"
;
break
;
case
24
:
funciton_name
=
"IRP_MJ_DEVICE_CHANGE"
;
break
;
case
25
:
funciton_name
=
"IRP_MJ_QUERY_QUOTA"
;
break
;
case
26
:
funciton_name
=
"IRP_MJ_SET_QUOTA"
;
break
;
case
27
:
funciton_name
=
"IRP_MJ_PNP"
;
break
;
case
28
:
funciton_name
=
"IRP_MJ_PNP_POWER"
;
break
;
case
255
:
funciton_name
=
"IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION"
;
break
;
case
254
:
funciton_name
=
"IRP_MJ_RELEASE_FOR_SECTION_SYNCHRONIZATION"
;
break
;
case
253
:
funciton_name
=
"IRP_MJ_ACQUIRE_FOR_MOD_WRITE"
;
break
;
case
252
:
funciton_name
=
"IRP_MJ_RELEASE_FOR_MOD_WRITE"
;
break
;
case
251
:
funciton_name
=
"IRP_MJ_ACQUIRE_FOR_CC_FLUSH"
;
break
;
case
250
:
funciton_name
=
"IRP_MJ_RELEASE_FOR_CC_FLUSH"
;
break
;
case
249
:
funciton_name
=
"IRP_MJ_QUERY_OPEN"
;
break
;
case
243
:
funciton_name
=
"IRP_MJ_FAST_IO_CHECK_IF_POSSIBLE"
;
break
;
case
242
:
funciton_name
=
"IRP_MJ_NETWORK_QUERY_OPEN"
;
break
;
case
241
:
funciton_name
=
"IRP_MJ_MDL_READ"
;
break
;
case
240
:
funciton_name
=
"IRP_MJ_MDL_READ_COMPLETE"
;
break
;
case
239
:
funciton_name
=
"IRP_MJ_PREPARE_MDL_WRITE"
;
break
;
case
238
:
funciton_name
=
"IRP_MJ_MDL_WRITE_COMPLETE"
;
break
;
case
237
:
funciton_name
=
"IRP_MJ_VOLUME_MOUNT"
;
break
;
case
236
:
funciton_name
=
"IRP_MJ_VOLUME_DISMOUN"
;
break
;
case
128
:
funciton_name
=
"IRP_MJ_OPERATION_END"
;
break
;
}
if
(funciton_name.size() >
0
) {
return
funciton_name;
}
else
{
return
"<N/I> : "
+
std::to_string(Index);
}
}