3.1.4.3.5 IWbemServices::GetObjectAsync (Opnum 7)

The IWbemServices::GetObjectAsync method is the asynchronous version of the IWbemServices::GetObject method.

 HRESULT GetObjectAsync(
   [in] const BSTR strObjectPath,
   [in] long lFlags,
   [in] IWbemContext* pCtx,
   [in] IWbemObjectSink* pResponseHandler
 );

strObjectPath: MUST be the CIM path of the CIM object to be retrieved. If this parameter is set to NULL, the server MUST return an empty CIM object.

lFlags: Specifies the behavior of the GetObjectAsync method. Flag behavior MUST be interpreted as specified in the following table.

The server MUST accept a 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.

Value

Meaning

WBEM_FLAG_USE_AMENDED_QUALIFIERS

0x00020000

If this bit is not set, the server SHOULD return no CIM localizable information.

If this bit is set, the server SHOULD return CIM localizable information for the CIM object, as specified in section 2.2.6.

WBEM_FLAG_SEND_STATUS

0x00000080

If this bit is not set, the server MUST make one final IWbemObjectSink::SetStatus call on the interface pointer that is provided in the pResponseHandler parameter.

If this bit is set, the server MAY make intermediate IWbemObjectSink::SetStatus calls on the interface pointer prior to call completion.

WBEM_FLAG_DIRECT_READ

0x00000200

If this bit is not set, the implementer 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.

pCtx: MUST be a pointer to an IWbemContext interface, which MUST contain additional information that the client wants to provide to the server about the CIM object referred to by strObjectPath. If pCtx is NULL, the parameter MUST be ignored.

pResponseHandler: MUST be a pointer to the IWbemObjectSink interface that is implemented by the caller, where enumeration results are delivered. The parameter MUST NOT be NULL. If the parameter is NULL, the server MUST return WBEM_E_INVALID_PARAMETER.

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 (specified in section 2.2.11) to indicate the successful completion of the method.

WBEM_S_NO_ERROR (0x00)

The following validation occurs before an asynchronous operation is started:

The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.

Requirements mentioned in the parameter definitions are also checked before an asynchronous operation is started.

If successful, the server MUST create a new entry in AsyncOperationTable as specified in section 3.1.1.1.3.

The following validation happens asynchronously.

In response to IwbemServices::GetObjectAsync method, the server MUST interpret strObjectPathas defined in [DMTF-DSP0004] section 8.5. If the path refers to a class, the server MUST look it up in the ClassTable. If found, the server MUST return an object that represents the ClassDeclaration. If strObjectPath refers to an instance, the server MUST check the InstanceProviderId for the class. If InstanceProviderId is NULL, then the server MUST look up the CIM database and return the CIM instance. If InstanceProviderId is not NULL, then the server MUST use the abstract interface specified as part of section 3.1.4.18 to communicate with the provider, and find the provider entry corresponding to the InstanceProviderId in the ProviderTable.

  • If found:

    • If SupportsGet is FALSE, the server MUST return WBEM_E_PROVIDER_NOT_CAPABLE.

    • Else, the server MUST use the abstract interface specified in section 3.1.4.17 to communicate with the provider, and return the appropriate results or the error code.

  • If not found, the server MUST return WBEM_E_PROVIDER_NOT_FOUND.

The method MUST fail if the CIM object that is referred to by strObjectPath does not exist, if the method parameters are not valid as specified in the preceding list, or if the server is unable to execute the method. The failed method execution MUST set the output parameters to NULL and MUST return an error in the format specified in section 2.2.11.

If a class is marked by a Singleton qualifier, the server MUST treat "Class-Name = @" in the object path as referencing the singleton instance of the class.