WMI Support

[Previous] [Next]

If you've specified that you want to handle IRP_MJ_SYSTEM_CONTROL requests, the wizard will present the page shown in Figure C-9 to allow you to specify the elements of your custom WMI schema.

click to view at full size.

Figure C-9. Page for specifying WMI options.

In this page, you should always leave the Use WMILIB option checked because the generated code won't give you much help in handling WMI requests otherwise. The Block Identifiers list names the class GUIDs in your custom schema in the order they'll appear in the GUID list for WMILIB.

Figure C-10 illustrates how you can describe one class in your custom schema. The topmost (unlabelled) control is the symbolic name of a GUID that the wizard will generate for you automatically. You can specify the following attributes of this class:

  • Number Of Instances  Indicates how many instances of the class your driver will create.
  • Expensive  Indicates an expensive class that must be specifically enabled.
  • Event Only  Indicates that the class is used only to fire an event.
  • Traced  Corresponds to a WMI option that I don't currently understand. But if I ever do understand it, I'll be able to use this check box to influence its state.

You can choose between PDO-based instance naming or instance naming using a base name. Microsoft recommends you use PDO-based naming.

Figure C-10. Dialog box for specifying a WMI class.



Programming the Microsoft Windows Driver Model
Programming the Microsoft Windows Driver Model
ISBN: 0735618038
EAN: 2147483647
Year: 1999
Pages: 93
Authors: Walter Oney

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net