1 out of 2 rated this helpful - Rate this topic

SWbemSink object

The SWbemSink object is implemented by client applications to receive the results of asynchronous operations and event notifications. To make an asynchronous call, you must create an instance of an SWbemSink object and pass it as the ObjWbemSink parameter. The events in your implementation of SWbemSink are triggered when status or results are returned, or when the call is complete. The VBScript CreateObject call creates this object.

Members

The SWbemSink object has these types of members:

Methods

The SWbemSink object has these methods.

MethodDescription
Cancel

Cancels all asynchronous operations that are associated with this sink.

 

Remarks

An asynchronous callback allows a non-authenticated user to provide data to the sink. This poses security risks to your scripts and applications. To eliminate the risks, use either semisynchronous communication or synchronous communication. For more information, see Calling a Method.

Events

You can implement subroutines to be called when events are triggered. For example, if you want to process each object that is returned by an asynchronous query call such as SWbemServices.ExecQueryAsync, create a subroutine using the sink that is specified in the asynchronous call, as shown in the following example.

Sub SinkName_OnObjectReady(objObject, objAsyncContext)

Use the following table as a reference to identify events and trigger descriptions.

EventDescription
OnCompleted Triggered when an asynchronous operation is complete.
OnObjectPut Triggered when an asynchronous Put operation is complete.
OnObjectReady Triggered when an object provided by an asynchronous call is available.
OnProgress Triggered to provide the status of a asynchronous operation.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wbemdisp.h

IDL

Wbemdisp.idl

DLL

Wbemdisp.dll

See also

Scripting API Objects

 

 

Send comments about this topic to Microsoft

Build date: 11/19/2012

Community Additions

ADD
© 2013 Microsoft. All rights reserved.