0

I want to send an irp from Minifilter to another kernel driver.I want to use IoGetDeviceObjectPointer and get the fileobject of the target driver object ,and then use FltDeviceIoControlFile to send irp.

The target driver is not a Minifilter but a common device which is FILE_DEVICE_UNKNOWN.

So if how can i get the FileObject or DeviceObject of the target device in Minifilter.If no way,what should i do for this communication? Thank you!

    status = IoGetDeviceObjectPointer(&name_str, FILE_ALL_ACCESS, &fileobj, &devobj);
    if (NT_SUCCESS(status)) {
        DbgPrintEx(0, 0, "send irp\n");
        status = FltDeviceIoControlFile(FltObjects->Instance, fileobj, IO_Init, NULL, 0, NULL, 0, NULL);
}

0 Answers0