This documentation is archived and is not being maintained.

ManagementEventWatcher.WaitForNextEvent Method

Waits for the next event that matches the specified query to arrive, and then returns it.

[Visual Basic]
Public Function WaitForNextEvent() As ManagementBaseObject
public ManagementBaseObject WaitForNextEvent();
public: ManagementBaseObject* WaitForNextEvent();
public function WaitForNextEvent() : ManagementBaseObject;

Return Value

A ManagementBaseObject representing the newly arrived event.


If the event watcher object contains options with a specified timeout, the API will wait for the next event only for the specified amount of time; otherwise, the API will be blocked until the next event occurs.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ManagementEventWatcher Class | ManagementEventWatcher Members | System.Management Namespace