An example of using WMI event processing through COM from C++ Written in Visual C++ 2010 dialect. Heavily uses threads for educational purpose.
Listening for WMI events: http://msdn.microsoft.com/en-us/library/windows/desktop/aa390425%28v=vs.85%29.aspx
Executable interface is described in TaskMonitor/ReadMe.txt