IWbemCallResult interface

The IWbemCallResult interface is used for semisynchronous calls of the IWbemServices interface. When making such calls, the called IWbemServices method returns immediately, along with an IWbemCallResult object. Periodically, you can poll the returned IWbemCallResult object to determine the status of the call. You can obtain the result of the original IWbemServices call after it is complete by calling IWbemCallResult::GetCallStatus.

This call-return paradigm is useful in cases where a thread cannot afford to be blocked for more than a few seconds because it is servicing other tasks, such as processing window messages.

Not all IWbemServices methods support this interface because it is not required for all of them. The intent is to allow nonblocking, synchronous operation (semisynchronous operation) for all relevant operations. Because many of the IWbemServices methods are already nonblocking due to the use of enumerators or other constructs, only the following methods need this helper interface to support semisynchronous operation:

Methods

The IWbemCallResult interface has these methods.

Method Description
IWbemCallResult::GetCallStatus The IWbemCallResult::GetCallStatus method returns to the user the status of the current outstanding semisynchronous call. When this call returns WBEM_S_NO_ERROR, the original call to the IWbemServices method is complete.
IWbemCallResult::GetResultObject The IWbemCallResult::GetResultObject method attempts to retrieve an object from a previous semisynchronous call to IWbemServices::GetObject or IWbemServices::ExecMethod.
IWbemCallResult::GetResultServices Retrieves the IWbemServices pointer, which results from a semisynchronous call to IWbemServices::OpenNamespace when it becomes available.
IWbemCallResult::GetResultString The IWbemCallResult::GetResultString method returns the assigned object path of an instance newly created by IWbemServices::PutInstance.

Requirements

   
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wbemcli.h (include Wbemidl.h)