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 !
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.