WDF WMI Question

I’ve already read the Wmi part on “Developing Drivers with the Microsoft Driver Foundation” but it is not yet clear to me how the driver can be detected by a user-app once it is plugged-in. Basically we’re creating the WDF version of a driver that already supports WMI in its WDM version.

We’ve been using the PortingTables document (Summary of KMDF and WDM Equivalents) as a reference. But it wasn’t mentioned there what is the equivalent of the WDM’s WMILIB_CONTEXT fields listed below on WDF.
(1) GUidList
(2) QueryWmiRegInf
(3) QueryWmiDataBlock
(4) SetWmiDataBlock
(5) SetWmiDataItem
(6) ExecuteWmiMethod
(7) WmiFUnctionControl

I’ve read the WDF Wmi docs too but the API seems new, maybe a lot of unecessary operations have been streamlined. Meaning there seems to be no one-to-one correspondence from WDM to WDF.

I just want to ask the experts here on what is minimally required for a device to be detected by the user-app using WDF. We’ve coded EvtWmiInstanceQueryInstance, EvtWmiInstanceSetInstance, and EvtWmiInstanceSetItem but it doesn’t seem to show the device to the user-app though.

You are asking two questions. How does the app find the driver ? It uses device interface notifications. How does the app find the wmi instances? It queries wmi (there is no event by for new instances). Hoe does the driver know the app found its wmi instance? It doesn’t.

d

Bent from my phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?3/?18/?2015 6:33 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] WDF WMI Question

I’ve already read the Wmi part on “Developing Drivers with the Microsoft Driver Foundation” but it is not yet clear to me how the driver can be detected by a user-app once it is plugged-in. Basically we’re creating the WDF version of a driver that already supports WMI in its WDM version.

We’ve been using the PortingTables document (Summary of KMDF and WDM Equivalents) as a reference. But it wasn’t mentioned there what is the equivalent of the WDM’s WMILIB_CONTEXT fields listed below on WDF.
(1) GUidList
(2) QueryWmiRegInf
(3) QueryWmiDataBlock
(4) SetWmiDataBlock
(5) SetWmiDataItem
(6) ExecuteWmiMethod
(7) WmiFUnctionControl

I’ve read the WDF Wmi docs too but the API seems new, maybe a lot of unecessary operations have been streamlined. Meaning there seems to be no one-to-one correspondence from WDM to WDF.

I just want to ask the experts here on what is minimally required for a device to be detected by the user-app using WDF. We’ve coded EvtWmiInstanceQueryInstance, EvtWmiInstanceSetInstance, and EvtWmiInstanceSetItem but it doesn’t seem to show the device to the user-app though.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Thanks for the reply Doron. Our WDM driver is already detected by our app so the windows app part seem to be working already. What we want to do is to be able to do is to make it work using WDF. Does the example from the book (which is similar to toaster’s implementation of WMI) already work? In short does it (toaster like wmi example) already implement device interface notifications?