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

StackOverflow https://stackoverflow.com/questions/18079610

  •  23-06-2022
  •  | 
  •  

문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top