18.104.22.168.17 IWbemServices::CreateInstanceEnumAsync (Opnum 19)
The IWbemServices::CreateInstanceEnumAsync method provides an asynchronous instance enumeration. When this method is invoked, the server MUST return all instances for the specific class in the current namespace.
HRESULT CreateInstanceEnumAsync( [in] const BSTR strSuperClass, [in] long lFlags, [in] IWbemContext* pCtx, [in] IWbemObjectSink* pResponseHandler );
strSuperClass: MUST contain the name of the CIM class for which the client wants instances. This parameter MUST NOT be NULL.
lFlags: Flags that affect the behavior of the IWbemServices::CreateInstanceEnumAsync method. Flag behavior MUST be interpreted as specified in the following table.
The server MUST allow any combination of zero or more flags from the following table and MUST comply with all the restrictions in a flag description. Any other DWORD value that does not match a flag condition MUST be treated as not valid.
If this bit is not set, the server SHOULD return no CIM localizable information.
If this bit is set, the server MAY make intermediate IWbemObjectSink::SetStatus calls on the interface pointer prior to call completion.
If this bit is not set, the server MUST consider the entire class hierarchy when it returns the result.
If this bit is set, the server MUST disregard any derived class when it searches the result.
If this bit is set, the server MUST return instances of the requested class only and MUST exclude instances of classes that are derived from the requested class.
If this bit is not set, the server MUST return all instances of the requested class as well as instances of classes that are derived from the requested class.
pCtx: MUST be a pointer to an IWbemContext interface, which MUST contain additional information that the client wants to pass to the server. If pCtx is NULL, the parameter MUST be ignored.
pResponseHandler: MUST be a pointer to the IWbemObjectSink interface that is implemented by the caller and where enumeration results are delivered. The parameter MUST NOT be NULL.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11) to indicate the successful completion of the method.
The following validation happens before asynchronous operation is started.
The security principal that makes the call MUST have WBEM_ENABLE and WBEM_REMOTE_ENABLE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The method MUST fail if strSuperClass does not exist.
The server SHOULD enforce a maximum length for the strSuperClass parameter and return WBEM_E_QUOTA_VIOLATION if the limit is exceeded.<47>
Requirements mentioned in the parameter definitions are also checked before starting the asynchronous operation.
If successful, the server MUST create a new entry in AsyncOperationTable as specified in section 22.214.171.124.3.
The following validation happens asynchronously.
If strSuperClass is dynamic, the server MUST obtain SupportsEnumerate for the given provider in the ProviderTable. If SupportsEnumerate is FALSE, the server MUST return WBEM_E_PROVIDER_NOT_CAPABLE.
In response to IWbemServices::CreateInstanceEnumAsync, the server MUST evaluate the strSuperClass parameter (as specified in this section) and MUST return all instances for the specified class in the current namespace. The method MUST fail if the following applies: if the method parameters or their combinations are not valid as specified earlier in this section or if the server is unable to execute the method.