WMI C++ Application Examples

The WMI application examples in this section are written in C++. They demonstrate a range of tasks that can be completed using WMI components and offer an alternative over using Visual Basic scripts. Each application is separated into a series of steps in a similar way so that code sections from different examples can easily be combined to form customized applications.

The following table lists the C++ examples in this section.

Example Description
Example: Getting WMI Data from the Local Computer This example connects to the WMI namespace on the local computer and gets data from a query on the local computer. The data is gathered semisynchronously.
Example: Getting WMI Data from the Local Computer Asynchronously This example connects to the WMI namespace on the local computer and gets data from a query on the local computer. The data is gathered asynchronously.
Example: Getting WMI Data from a Remote Computer This example connects to the WMI namespace on a remote computer and gets data from a query on the remote computer. The data is gathered semisynchronously.
Example: Calling a Provider Method This example connects to the WMI namespace on the local computer and calls a method in WMI. The method is executed synchronously.
Example: Receiving Event Notifications Through WMI This example connects to the WMI namespace on the local computer and receives an event from the local computer. The event is received semisynchronously.