[This is preliminary documentation and subject to change.]
The IWbemServices::CreateClassEnumAsync method performs the same function as IWbemServices::CreateClassEnum except that the objects are returned to the specified IWbemObjectSink implementation instead of to an enumerator.
In cases where the call succeeds, CIMOM calls AddRef on the pointer pResponseHandler, and then returns immediately. It then asynchronously calls pResponseHandler – >Notify from another thread with class definitions until the query has been satisfied.
HRESULT IWbemServices::CreateClassEnumAsync(
[in] BSTR bstrSuperclass,
[in] LONG lFlags,
[in] IWbemContext *pCtx,
[in]CALLBACK *pResponseHandler
);
WBEM_FLAG_SHALLOW forces the enumeration to include only immediate subclasses of the specified superclass.
Note If bstrSuperclass is NULL or blank and WBEM_FLAG_DEEP is specified, all classes are returned.
WBEM_E_FAILED | Unspecified error. |
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_TRANSPORT_FAILURE | A communications failure has occurred between the client process and CIMOM. |
WBEM_NO_ERROR | The call succeeded. |
On failure, you can obtain available information from the COM function GetErrorInfo.
Asynchronous Methods, IWbemServices::CreateClassEnum, IWbemObjectSink