## The WMIEXTRA Sample

The WMIEXTRA Sample accompanies Chapter 10 and illustrates some more advanced features of WMI, including:

- Firing a WMI event
- Collecting "expensive" statistics
- Executing a method routine

The sample includes one component: WMIEXTRA.SYS is a WDM driver for a non-existent hardware device.

### Building WMIEXTRA

To build WMIEXTRA.SYS, follow the general instructions for building a WDM sample. The Microsoft Visual C++ project file is named WMIEXTRA.DSP.

### Testing WMIEXTRA

Install WMIEXTRA.SYS. Follow the general instructions for using FastInst in Windows XP Windows 98/Me. The INF file is named WMIEXTRA.INF.

If you're testing in Windows 98/Me, please refer to the general instructions for WMI in Windows 98/Me for additional information.

Once you’ve installed WMIEXTRA, launch TEST.HTM in your web browser. This page presents a form with buttons for testing WMIEXTRA's schema.

### What to look for

Most of the interesting code in this sample is in wmi.cpp. Refer to the IOCTL_FIRE_EVENT handler in control.cpp for an example of how to fire a WMI event.