If an event is available, the NextEvent method of the SWbemEventSource object retrieves the event from an event query.
For an explanation of this syntax, see Document Conventions for the Scripting API.
objWbemObject = .NextEvent( _ [ ByVal iTimeoutMs ] _ )
iTimeoutMs [in, optional]
Number of milliseconds the call waits for an event before returning a time-out error. The default value for this parameter is wbemTimeoutInfinite (-1), which directs the call to wait indefinitely.
If the NextEvent method is successful, it returns an SWbemObject object that contains the requested event. If the call times out, the returned object is NULL and an error is raised.
Upon the completion of the NextEvent method, the Err object may contain the error code in the following list.
wbemErrTimedOut - 0x80043001
Requested event did not arrive in the amount of time specified in iTimeoutMs.
|Minimum supported client
|Minimum supported server
||Windows Server 2008