How to handle hardware event using IRP-based approach in WDK

Hi all,
I am trying to implement hardware event in a PCI driver using the IRP-based approach developing in the hardware event sample “general/event/”
However, this is written as a WDM model and I would like to have an equivalent for a WDK model.
Where can I find some examples for hardware event using IRP-based approach in WDK ?
Thanks.
Best Regards,

That sample is embarrassingly old and outdated. On the other hand just use the kmdf ioctl sample as a starting point for a wdf driver and apply the concepts in the event sample to it.
https://github.com/microsoft/Windows-driver-samples/tree/master/general/ioctl/kmdf

Thank you Mark for your reply.
Just note that the event sample does not work on my win10 (BSOD).
I read the general ioctl\kmdf but it is for a non-pnp application and my drive is PnP.
In fact, I am looking for an example of how a driver event is signalled to the user app.
I read over PST that one way is to use overlapped structure and completion I/O port.
Do you have an example of this kind of structure to help me ?
Thanks.

The fact that the sample is non-PnP is completely irrelevant to your need. You want an example of how to do communication, and that part is the same.

… one way is to use overlapped structure and completion I/O port.

Those are user-mode concerns. They don’t have any impact on the driver. The basic concept is that the application submits a few ioctls, the driver stores those in a queue, and when something interesting happens, the driver pops one of the pending requests and completes it. The application processes it and sends it back to the driver. It’s just that simple.