Bewerken

Delen via


Implementing Dynamic MOF Data

A driver's schema can be published dynamically by including binary MOF data in the driver's binary and returning selected schema information at runtime. To supply dynamic MOF data, a driver should follow these steps:

  1. Compile the MOF file as described in Compiling a Driver's MOF File.

  2. Use wmimofck.exe to create a .x file which will contain a hexadecimal dump of the .bmf file created by the MOF compiler.

  3. Use #include to include the hex data created in step 2 with the driver's source.

  4. Register as supporting MSWmi_MofData_GUID, which is a GUID defined in wmidata.h.

  5. Return selected binary data to WMI in response to both the IRP_MN_QUERY_ALL_DATA or IRP_MN_QUERY_SINGLE_INSTANCE requests for MSWmi_MofData_GUID.

For more information about the wmimofck utility see Using wmimofck.exe.