Export (0) Print
Expand All

SWbemEventSource.NextEvent method

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.

Syntax

objWbemObject = .NextEvent( _
  [ ByVal iTimeoutMs ] _
)

Parameters

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.

Return value

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.

Error codes

Upon the completion of the NextEvent method, the Err object may contain the error code in the following table.

ErrorMeaning
wbemErrTimedOut
0x80043001

Requested event did not arrive in the amount of time specified in iTimeoutMs.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Type library

Wbemdisp.tlb

DLL

Wbemdisp.dll

 

 

Show:
© 2014 Microsoft