Bewerken

Delen via


MOF Syntax for WMI Data and Event Blocks

A driver's WMI schema describes its data blocks, which define the information that a driver can provide and the methods it can execute in response to WMI requests. A driver's schema also describes its event blocks, which are data blocks that the driver sends to WMI when a driver-determined event occurs for which a WMI client user has requested notification.

A driver writer defines a driver's schema in Managed Object Format (MOF). MOF is a compiled language created by the Desktop Management Task force (DMTF) and based on Interface Definition language (IDL). A driver's MOF file contains a MOF class definition for each data block and event block the driver exposes to WMI.

A MOF class definition for a WMI data block follows this syntax:

[Required and optional class qualifiers]

classClassName : OptionalBaseClass 
{ 
[key, read] 
string InstanceName; 
[read] 
boolean Active; 
[ Required and optional property qualifiers ] 
datatype itemname1; 
[ Required and optional property qualifiers ] 
datatype itemnameN; 
}; 

The following topics describe the syntax elements shown above:

WMI Class Qualifiers

WMI Class Names and Base Classes

Required Items in WMI Classes

WMI Property Qualifiers

Driver-Defined WMI Data Items

WMI Class Examples

For a general discussion of MOF syntax as it pertains to WMI clients and other kinds of applications, see the Microsoft Windows SDK.