GBC
GBC

Reputation: 3326

Creating and using an IRP internally within a driver

I am writing a driver which currently handles IRPs send from userland.

My question is: is there any way to construct IRPs inside the driver and pass them internally to the functions currently handling userland IRPs?

I've seen information about creating IRPs and sending them to other drivers, but I need to pass them internally.

Greatly appreciate any help.

Regards,

Upvotes: 0

Views: 490

Answers (1)

Alexey Frunze
Alexey Frunze

Reputation: 62048

I'm not sure what the best way is, but I'd see if it's possible to just allocate an IRP and either send it using IoCallDriver() or pass it directly to the dispatch routine. Also, I think you should be able to use functions like NtDeviceIoControl()/ZwDeviceIoControl(), which would be largely equivalent to calling the driver from the user mode.

Upvotes: 1

Related Questions