[This is preliminary documentation and subject to change.]
The IWbemServices::CreateClassEnum method returns an enumerator for all classes satisfying the selection criteria.
The caller must then use the returned enumerator to retrieve the class definitions, calling IEnumWbemClassObject::Next to obtain each class or blocks of classes. It finishes by calling IEnumWbemClassObject::Release.
Note that it is not an error for the returned enumerator to have zero elements.
HRESULT IWbemServices::CreateClassEnum(
[in] BSTR bstrSuperclass,
[in] LONG lFlags,
[in] IWbemContext *pCtx,
[out] IEnumWbemClassObject **ppEnum
);
WBEM_E_ACCESS_DENIED | The current user does not have permission to view one or more of the classes that the call can return. |
WBEM_E_FAILED | Other unspecified errors. |
WBEM_E_INVALID_CLASS | The specified class did not exist. |
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 occurred between CIMOM and the client. |
WBEM_NO_ERROR | The call succeeded. |
On failure, you can obtain any available information from the COM function GetErrorInfo.
Error Objects, IWbemServices::CreateClassEnumAsync, IEnumWbemClassObject