[SOLVED] From WDM to WDF for KPE Interface querying?

Hi,
I am working on implementing a KPE interface for the communication between two drivers, the documentation I’ve got mentions the querying of the interface via WDF functions, however our driver it’s WDM based, so I would like to ask if there is a way to convert the PDEVICE_OBJECT to WDFDEVICE ? From what I’ve looked on this subject seems that I need to do the querying via IRP_MN_QUERY_INTERFACE since the driver is WDM, but I’d like to confirm this.

thank you!

From a WDM driver, you allocate a request (IoAllocateIrp), format it (MJ_PNP/MN_QUERY_INTERFACE, set the values), and sync send it. The target can be KMDF or WDM, it is transparent. You can’t coerce KMDF to do this for your if it is not a KMDF driver.

d

Great, that was exactly what I was looking to cose here, thank you!