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
[C#]
public ManagementBaseObject WaitForNextEvent();
[C++]
public: ManagementBaseObject* WaitForNextEvent();
[JScript]
public function WaitForNextEvent() : ManagementBaseObject;

Return Value

A ManagementBaseObject representing the newly arrived event.

Remarks

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.

Requirements

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

Show: