IWbemCallResult::GetCallStatus method (wbemcli.h)

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.

Syntax

HRESULT GetCallStatus(
  [in]  long lTimeout,
  [out] long *plStatus
);

Parameters

[in] lTimeout

Specifies the maximum time in milliseconds that this call blocks before it returns. If you use the constant WBEM_INFINITE (0xFFFFFFFF), the call blocks until the original semisynchronous call to an IWbemServices method is complete. If you use 0 (zero), the call immediately returns the call status.

[out] plStatus

If WBEM_S_NO_ERROR returns in the HRESULT to this method, this parameter will receive the final result status of a call to one of the IWbemServices methods: OpenNamespace, PutInstance, PutClass, GetObject, DeleteInstance, DeleteClass, or ExecMethod. On error, the value pointed to by plStatus will not be used.

Return value

This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an HRESULT.

Remarks

On error, you can call the COM function GetErrorInfo to obtain more error information. COM-specific error codes may also be returned if network problems cause you to lose the remote connection to Windows Management.

After invoking an IWbemServices method semisynchronously, you can call GetCallStatus at any time to determine whether the call is complete. After GetCallStatus has returned WBEM_S_NO_ERROR, which indicates completion of the original IWbemServices operation, calls to other IWbemCallResult methods may be required to retrieve the result of the call, according to the following rules:

Requirements

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

See also

IWbemCallResult

IWbemServices::DeleteClass

IWbemServices::DeleteInstance

IWbemServices::ExecMethod

IWbemServices::GetObject

IWbemServices::OpenNamespace

IWbemServices::PutInstance