IWbemCallResult::GetCallStatus
[This is preliminary documentation and subject to change.]
The IWbemCallResult::GetCallStatus method returns to the user the status of the current outstanding semisynchronous call. When this call returns WBEM_NO_ERROR, then the original call to the IWbemServices method has completed.
HRESULT GetCallStatus(
[in] LONG lTimeout,
[out] LONG *plStatus
);
Parameters
-
lTimeout
-
Specifies the maximum time in milliseconds you must wait for the call to return. If you use the Win32® constant INFINITE (0xFFFFFFFF), the call will block until the original semisynchronous call to an IWbemServices method has completed. If you use zero, the call immediately returns the call status.
-
plStatus
-
If you return WBEM_NO_ERROR from the GetCallStatus call. If WBEM_NO_ERROR is returned in the HRESULT to this method, this parameter will receive the final result status of a call this parameter receives the result of the original semisychronous call to one of the IWbemServices methods: OpenNamespace, PutInstance, GetObject, DeleteInstance, DeleteClass, or ExecMethod. The error code returned by the corresponding synchronous calls of one of these methods will also be returned by this method upon completion of the call. The error code returned by the corresponding synchronous calls of one of these methods will also be returned by this method upon completion of the call. On error, plStatus will be ignored.
Return Values
WBEM_NO_ERROR |
The call has completed and plStatus has been assigned. |
WBEM_S_PENDING |
The call has not yet completed. |
WBEM_E_TRANSPORT_FAILURE |
The underlying remote connection to CIMOM has failed. |
WBEM_E_INVALID_PARAMETER |
An invalid parameter was specified, or the namespace could not be parsed. |
WBEM_E_FAILED |
An unexpected system error has occurred. |
On error, you can call the COM function GetErrorInfo to obtain more error information.
Remarks
After invoking an IWbemServices method semisynchronously, you can call GetCallStatus at any time to determine whether the call has completed. After GetCallStatus has returned WBEM_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:
-
For the IWbemServices method OpenNamespace, the GetResultServices method must be called to retrieve the new IWbemServices pointer.
-
For the IWbemServices method PutInstance, the GetResultString method must be called to obtain the object path that was assigned to the object.
-
For the IWbemServices method GetObject, the GetResultObject method must be called to retrieve the object.
-
For the IWbemServices methods DeleteInstance, DeleteClass, and ExecMethod, the GetCallStatus method is the only call that returns information regarding these operations.
See Also
IWbemServices::OpenNamespace, IWbemServices::PutInstance, IWbemServices::GetObject, IWbemServices::DeleteInstance, IWbemServices::DeleteClass, IWbemServices::ExecMethod