Subscribes to temporary event notifications based on a specified event query.
Assembly: System.Management (in System.Management.dll)
The following example shows how the client receives notification when an instance of Win32_Process is created because the event class is __InstanceCreationEvent. For more information, see the Windows Management Instrumentation documentation in the MSDN Library at http://msdn.microsoft.com/library. The client receives events synchronously by calling the WaitForNextEvent method. This example can be tested by starting a process, such as Notepad, while the example code is running.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.