DIWbemServices.GetObjectAsync

[This is preliminary documentation and subject to change.]

The DIWbemServices.GetObjectAsync method asynchronously retrieves an object, either a class definition or instance, based on the object's path. This is similar to DIWbemServices.GetObject, except that the call returns immediately. and the object is provided to the supplied object sink.

Currently, this method retrieves objects only from the namespace associated with DIWbemServices .

DIWbemServices.GetObjectAsync(
  [in] ObjectPath As String,                   
  [in] lFlags As Long,                       
  [in] pCtx As Object,              
  [in] pResponseHandler As Object
) As Long
 

Parameters

ObjectPath
The object path of the object to retrieve. If this is set to NOTHING, an empty object is returned. This object can become a new class. See Class Creation ,Object Paths.
lFlags
Reserved. It must be zero.
pCtx
Typically NOTHING. Otherwise, this is a DWbemContext object required by the dynamic class provider that is producing the class instances. The values in the context object must be specified in the documentation for the provider in question.
pResponseHandler
The caller's implementation of DIWbemObjectSink. This handler receives the requested object when the object becomes available through the DIWbemObjectSink.SetStatus method. The pObjParam parameter contains the object. For a detailed explanation of this parameter, see also Asynchronous Methods.

Return Values

WBEM_E_FAILED Other error codes return asynchronously to the DIWbemObjectSink.
WBEM_E_INVALID_PARAMETER An invalid parameter was specified, or the namespace could not be parsed.
WBEM_E_INVALID_PATH The specified object path was invalid.
WBEM_NO_ERROR Success.

For more information on return values see Visual Basic error handeling and return values

See Also

Asynchronous Methods, Class Creation, DIWbemServices.GetObject, Object Paths