nicoooogna
nicoooogna

Reputation: 35

How can I make IOCTL calls from a driver to another driver (not in the same stack) (on windows)

I want to make IOCTL call from a driver to another one which is totally different (not on the same stack)

I have checked on the net, but they only talk about how to send IOCTL to a lower driver, but it's not my case.

p.s : Both drivers are witten by me, so I can create a device object in the second driver, but how can I commmunicate with it (I cannot make DeviceIOControl calls from kernel)

Thanks !

Upvotes: 3

Views: 2474

Answers (1)

Sergey Podobry
Sergey Podobry

Reputation: 7199

It doesn't differ much from sending IOCTLs from the userland. Just use ZwOpenFile to get a handle to your device and ZwDeviceIoControlFile to send IOCTLs. And don't forget to set OBJ_KERNEL_HANDLE attribute for the handle.

Upvotes: 3

Related Questions