I have an NDIS miniport driver that I’m creating a couple custom WMI classes for. I have done the following:
- Created a .mof to describe them
- Compiled the .mof and referenced it in the .rc
- Created the .h for my classes
- Created 2 new OID definitions (starting with 0xFF)
- Created NDIS_GUID entries that map my OID to the GUID defined in my .mof
- Return my new NDIS_GUID entries from OID_GEN_SUPPORTED_GUIDS
When running !ndiskd.miniport ffffe605e3f1b1a0 -wmi
I see my custom GUIDs like so:
771a0e47-c82a-43bb-b54e-cccba588a4XX OID 0xffXXXf01
OID, CUSTOM
23588cf4-2a05-4e5e-9aa0-d005990fa8XX OID 0xffXXXf02
OID, CUSTOM
I replaced a couple values with XX when posting so they don’t get copy/pasted somewhere in the wild
Then I followed Jeffrey’s handy write-up to try to find my WMI class by doing:
Get-WmiObject -Namespace root\wmi -List |
Where-Object {$_.Qualifiers['guid'].Value -eq '{771a0e47-c82a-43bb-b54e-cccba588a4XX}' }
However, nothing gets found. I double checked that this works by doing !ndiskd.help GUID_NDIS_GEN_VENDOR_ID
which resulted in:
GUID
GUID_NDIS_GEN_VENDOR_ID
{5ec1035e-a61a-11d0-8dd4-00c04fc3358c}
When running the WMI query using that GUID as follows, everything works:
Get-WmiObject -Namespace root\wmi -List |
Where-Object {$_.Qualifiers['guid'].Value -eq '{5ec1035e-a61a-11d0-8dd4-00c04fc3358c}' }
What am I missing such that I can find and query my custom WMI classes?