DIWbemServices.CreateInstanceEnumAsync

[This is preliminary documentation and subject to change.]

The DIWbemServices.CreateInstanceEnumAsync method performs the same task as DIWbemServices.CreateInstanceEnum, except that the call returns immediately and the instances are asynchronously provided to the specified response handler.

DIWbemServices.CreateInstanceEnumAsync(
  [in] Class As String, 
  [in] lFlags As Long, 
  [in] pCtx As Object, 
  [in] pResponseHandler As Object 
) As Long
 

Parameters

Class
A valid BSTR containing the name of the class for which instances are desired. This parameter cannot be vbNullString.
lFlags
WBEM_FLAG_DEEP when set to zero, forces recursive enumeration into all subclasses derived from the specified class. Instances of Class as well as those of its derived classes return. WBEM_FLAG_SHALLOW forces the enumeration to include only the instances of the specified class.
pCtx
Typically NOTHING. Otherwise, this is a DWbemContext object required by the dynamic class provider that is producing the class instances. You must specify the values in the context object in the documentation for the provider in question.
pResponseHandler
The caller's implementation of DIWbemObjectSink. This handler receives the objects as they become available. For a detailed explanation of this parameter, see Asynchronous Methods.

Return Values

WBEM_E_FAILED Unspecified error..
WBEM_E_INVALID_CLASS The specified class was invalid.
WBEM_E_INVALID_PARAMETER An invalid parameter was specified, or the namespace could not be parsed.
WBEM_E_OUT_OF_MEMORY There was not enough memory to complete the operation.
WBEM_E_RPC_FAILURE The RPC link between the client and CIMOM has failed.
WBEM_NO_ERROR Success.

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

See Also

Asynchronous Methods, DIWbemServices.CreateInstanceEnum