question

ARR-1086 avatar image
0 Votes"
ARR-1086 asked

Support standard WMI data blocks in driver

Hi all,
I am implementing WMI support in my driver. I am going through the msdn doc and found one statement that "All drivers must support any standard WMI data blocks that WMI defines for their device class. These WMI data blocks are defined in Wmicore.mof."
Ref: https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/introduction-to-wmi-for-kmdf-drivers

Below mof file is enough for me to get all the details. Here what kind of standard WMI data block can I add?
Kindly provide some examples and explain.
Thanks in advance!


This is my mof file:

PRAGMA AUTORECOVER


[Dynamic, Provider("WMIProv"),
WMI,
Description("Sensor driver stability information"),
guid("{c3915401-b2ba-4588-a354-1494d267b987}"),
locale("MS\\0x409")]
class Sensor7887
{
[key, read]
string InstanceName;

 [read]
 boolean Active;
    
 [WmiDataId(1),
  read,
  Description("This indicates the number of resets triggered by driver")]
 uint32 ResetCount;

 [WmiDataId(2),
  read,
  Description("This indicates the number of crashes")]
 uint32 CrashCount;

 [WmiDataId(3),
  read,
  Description("This indicates the number of surprise removals")]
 uint32 SurpriseRemovalCount;

 [WmiDataId(4),
  read,
  Description("The Model Name.")]
 string ModelName;

};


windows-11
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers