DIWbemCallResult.GetCallStatus

[This is preliminary documentation and subject to change.]

The DIWbemCallResult.GetCallStatus method gives you the status of the current outstanding semisynchronous call. When this call returns WBEM_NO_ERROR, you know the original call to the DIWbemServices method is complete.

GetCallStatus(
  [in] lTimeout As Long,
  [out] plStatus As Long
) As Long
 

Parameters

lTimeout
Specifies the maximum time in milliseconds to wait for the call to return. If you use the value WBEM_INFINITE, this call will block until the original semisynchronous call to an DIWbemServices method is complete. If you use zero, the call immediately returns the call status.
plStatus
If the GetCallStatus call returns WBEM_NO_ERROR, this parameter receives the result of the original semisynchronous call to one of the DIWbemServices methods. These methods are as follows: OpenNamespace, PutInstance, GetObject, DeleteInstance, DeleteClass, or ExecMethod. This method will also return any error codes that are returned if these methods are called syncronously. If GetCallStatus returns an error, plStatus will be ignored.

Return Values

WBEM_NO_ERROR The call has completed.
WBEM_S_PENDING The call has not yet completed.
WBEM_E_INVALID_PARAMETER An invalid parameter was specified, or the namespace could not be parsed.
WBEM_E_FAILED There is an unexpected system error.

For more information on return values see Visual Basic error handeling and return values

Remarks

After invoking an DIWbemServices method semisynchronously, you can call GetCallStatus at any time to see if the call has completed. After GetCallStatus has returned, you may have to make calls to other DIWbemCallResult methods to retrieve the result of the call, according to the following rules:

  1. For the DIWbemServices method OpenNamespace, you must call the GetResultServices method to retrieve the new DIWbemServices object.
  2. For the DIWbemServices method PutInstance, you must call the GetResultString method to retrieve the object path assigned to the object.
  3. For the DIWbemServices method GetObject, you must call the GetResultObject methodto retrieve the object.
  4. For the DIWbemServices methods DeleteInstance, DeleteClass, and ExecMethod, the GetCallStatus method is the only call that returns information regarding these operations.

See Also

DIWbemServices.OpenNamespace, DIWbemServices.PutInstance, DIWbemServices.GetObject, DIWbemServices.DeleteInstance, DIWbemServices.DeleteClass, DIWbemServices.ExecMethod