I have written a driver, that extracts a value from IRP buffer. Now based on this keyword I have to pass or discard the IRP. So I need to communicate with the database which is not easy from kernel mode driver. So I am using an application or exe for doing this which will result in true or false based on which I will pass or discard the IRP.

I want to link the driver with the application that I get the data in the client application.

I thought about using temp file that can act as a pipe.

Please suggest something.

有帮助吗?

解决方案

I would go with IOCTLs.

The application communicating with database starts with sending one or more IOCTLs to the driver. Let's call IOCTLs of this type IOCTL-1.

The completion of IOCTL-1 idicates a request from driver to the database. The request details can be passed in IOCTL output buffer.

The application detects IOCTL-1 completion, retrieves the request details, runs the query and passes results to the driver using a different IOCTL (IOCTL-2). Then it re-sends IOCTL-1 so that the driver can issue another request.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top