Communication between the delphi application and the Windows NT system driver

I am trying to create a very simple driver. Its sole purpose is to register "PsSetCreateProcessNotifyRoutine" and callbacks received from the kernel, to notify my Win32 application of which processes start and stop.

I know how to build such a simple driver using "DriverEntry" and "DriverUnload" and compile it using DDK. But I do not know how to really communicate. I know that this can be done using IOCTL. But beyond that, I'm in the dark. I cannot find a simple example of how to do this in Delphi. I only know that this can be done.

So what I'm looking for is a simple tutorial on how to do this, or an event is a better example of a delphi program using driver code. Perhaps there are other ways to communicate.

Any help would be assigned.

+5
source share
1 answer

It doesn't matter in Delphi or not. You must use the DeviceIoControl function. Read the MSDN article about this.

In short, you will have to select IOCTL codes from the available set. Then you call DeviceIoControl with one of these codes and pass some data, and in the driver you process this request and return something else.

IOCTLS, , ReadFile WriteFile .

", Delphi", . , , Win32/Native Api. , , .

+2

All Articles