Inside Windows driver routine which handles a DeviceIoControl call from client, I'd like to call many other DeviceIoControl routines using the same HANDLE as the client application. The initial DeviceIoControl routine runs only at the passive level in the driver. The calls to the many other DeviceIoControl routines are not restricted to the passive level. I have a working driver for a PCIe device. The initial call allocates memory on the device. The routines called from within the driver would initiate DMA IN to initialize the memory. Today, the allocation routine works and the DMA IN routines work. I've seen ZwDeviceIoControl, but it needs a HANDLE. Unfortunately, inside the driver, I only have the FILE_OBJECT. Is there a way to get a HANDLE from the FILE_OBJECT? It would need to be the same HANDLE or a duplicate HANDLE since the driver and PCIe device enforce memory protection. Only the PCI device's memory that is allocated to the FILE_OBJECT can be written by the DMA IN.
It looks like you're new here. If you want to get involved, click one of these buttons!
|Upcoming OSR Seminars|
|Developing Minifilters||29 July 2019||OSR Seminar Space|
|Writing WDF Drivers||23 Sept 2019||OSR Seminar Space|
|Kernel Debugging||21 Oct 2019||OSR Seminar Space|
|Internals & Software Drivers||18 Nov 2019||Dulles, VA|