WMI Property Qualifiers
The following table lists the required and optional MOF property qualifiers that can be used to define items in a WMI data or event block.
The following are standard MOF qualifiers: key, read, write, ValueMap, and Values. For more information about these and other standard MOF qualifiers, see MOF Data Types.
Qualifier | Description |
---|---|
key |
Indicates that the data item is a key property that uniquely identifies each instance of the class. Only the InstanceName property can be declared a key. |
read |
Indicates that a WMI client can read the data item. |
write |
Indicates that a WMI client can set the data item. |
BitMap |
Specifies the bit positions of the corresponding string values that are specified in BitValues. |
BitValues |
Specifies a list of string values (flag names) that represent bits set in the data item. The bit position of a flag is defined by the corresponding position specified in BitMap. |
DefineValues |
Specifies an enumerated list that the WMI tool suite compiles into a corresponding list of #define statements. |
DisplayInHex |
Specifies that any WMI client that displays the property value should do so in hexadecimal. |
DisplayName("string") |
Specifies a caption that a WMI client can use to display as the property name. |
MaxLen(uint) |
For string properties, MaxLen specifies the maximum length of the string in characters. The uint value can be any 32-bit unsigned integer. If MaxLen is omitted, or uint is zero, then the length of the string is unlimited. |
Values |
Specifies a list of possible values for this data item. If the data item is an enumeration, ValueMap contains the index value that corresponds to the enumeration value specified in Values. |
ValueMap |
Specifies the integer values of the corresponding string values in Values. |
WmiDataId(data-item-ID) |
(Required) Identifies a data item within a data block. Data item IDs must be assigned to all items in a block except the required items InstanceName and Active. Data item IDs must be assigned in a contiguous series, starting with 1. An item's data ID determines the order in which the item appears in an instance of the data block; the order of items in the MOF class definition is irrelevant. |
WmiMethodId(method-item-ID) |
Identifies a method within a data block. |
WmiSizeIs("data-item-name") |
Specifies the name of another data item in this block that indicates the number of elements in the variable-length array at this data item. WmiSizeIs is valid only for data items that define arrays. |
WmiScale(scale-factor) |
Specifies the scaling factor, as a power of 10, that the driver uses when returning the value of this data item. For example, if scale-factor is 5, the value returned by the driver is multiplied by 10⁵. If WmiScale is omitted, scale-factor can be assumed to be 0. |
WmiTimeStamp |
Specifies that a 64-bit data item is a time stamp in units of 100 nanoseconds since 1/1/1601. WmiTimeStamp is valid only for 64-bit data items. |
WmiComplexity(level) |
Specifies an integer value that expresses the user complexity level of the data item. WMI clients can use that value to distinguish between data items that should be available to novice users and data items that should be restricted to more advanced users. Zero is the minimum value, and higher values indicate higher user complexity. WmiComplexity defaults to zero if not specified. |
WmiVolatility(interval) |
Specifies the interval, in milliseconds, between updates of this data item. For example, if a data item is updated once each second, interval would be 1000. A WMI client might check WmiVolatility to determine how often to query for a potentially new value. If WmiVolatility is omitted, interval is undefined. |
WmiEventTrigger( " data-item-name") |
Specifies the name of a data item in an event block that a WMI client can set to define the trigger value for the event. For example, if the event TooHot is qualified with WmiEventTrigger("TooHotTemperature"), a WMI client could set TooHotTemperature to instruct the driver to send the TooHot event when the device reached the user-specified value for TooHotTemperature. Typically a driver would define the trigger value. By exposing a WmiEventTrigger data item, the driver allows a client to control when a particular event is fired. |
WmiEventRate("data-item-name") |
Specifies the name of a data item in an event block that a WMI client can set to control the frequency at which this event will be sent. For example, if the data item TooHot is qualified with WmiEventRate("SendEventRate"), a WMI client user could set SendEventRate to instruct the driver to send TooHot at the user-specified interval. |