IRP打印
2022-08-31
26
1
NTSTATUS
FilterEvtIrpPreprocess(
IN WDFDEVICE Device,
PIRP Irp
)
{
PIO_STACK_LOCATION currentStack;
LPSTR major;
currentStack = IoGetCurrentIrpStackLocation(Irp);
major = "???";
switch (currentStack->MajorFunction) {
case IRP_MJ_CREATE: major = "IRP_MJ_CREATE"; break;
case IRP_MJ_CREATE_NAMED_PIPE: major = "IRP_MJ_CREATE_NAMED_PIPE"; break;
case IRP_MJ_CLOSE: major = "IRP_MJ_CLOSE"; break;
case IRP_MJ_READ: major = "IRP_MJ_READ"; break;
case IRP_MJ_WRITE: major = "IRP_MJ_WRITE"; break;
case IRP_MJ_QUERY_INFORMATION: major = "IRP_MJ_QUERY_INFORMATION"; break;
case IRP_MJ_SET_INFORMATION: major = "IRP_MJ_SET_INFORMATION"; break;
case IRP_MJ_QUERY_EA: major = "IRP_MJ_QUERY_EA"; break;
case IRP_MJ_SET_EA: major = "IRP_MJ_SET_EA"; break;
case IRP_MJ_FLUSH_BUFFERS: major = "IRP_MJ_FLUSH_BUFFERS"; break;
case IRP_MJ_QUERY_VOLUME_INFORMATION: major = "IRP_MJ_QUERY_VOLUME_INFORMATION"; break;
case IRP_MJ_SET_VOLUME_INFORMATION: major = "IRP_MJ_SET_VOLUME_INFORMATION"; break;
case IRP_MJ_DIRECTORY_CONTROL: major = "IRP_MJ_DIRECTORY_CONTROL"; break;
case IRP_MJ_FILE_SYSTEM_CONTROL: major = "IRP_MJ_FILE_SYSTEM_CONTROL"; break;
case IRP_MJ_DEVICE_CONTROL: major = "IRP_MJ_DEVICE_CONTROL"; break;
case IRP_MJ_INTERNAL_DEVICE_CONTROL: major = "IRP_MJ_INTERNAL_DEVICE_CONTROL"; break;
case IRP_MJ_SHUTDOWN: major = "IRP_MJ_SHUTDOWN"; break;
case IRP_MJ_LOCK_CONTROL: major = "IRP_MJ_LOCK_CONTROL"; break;
case IRP_MJ_CLEANUP: major = "IRP_MJ_CLEANUP"; break;
case IRP_MJ_CREATE_MAILSLOT: major = "IRP_MJ_CREATE_MAILSLOT"; break;
case IRP_MJ_QUERY_SECURITY: major = "IRP_MJ_QUERY_SECURITY"; break;
case IRP_MJ_SET_SECURITY: major = "IRP_MJ_SET_SECURITY"; break;
case IRP_MJ_POWER: major = "IRP_MJ_POWER"; break;
case IRP_MJ_SYSTEM_CONTROL: major = "IRP_MJ_SYSTEM_CONTROL"; break;
case IRP_MJ_DEVICE_CHANGE: major = "IRP_MJ_DEVICE_CHANGE"; break;
case IRP_MJ_QUERY_QUOTA: major = "IRP_MJ_QUERY_QUOTA"; break;
case IRP_MJ_SET_QUOTA: major = "IRP_MJ_SET_QUOTA"; break;
case IRP_MJ_PNP: major = "IRP_MJ_PNP"; break;
}
if (major)
{
KdPrint(("[webcam-interception] major: %s\n", major));
}
}