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.
HRESULT GetCallStatus( long lTimeout, long *plStatus );
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.
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.
This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an HRESULT.
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:
- For IWbemServices::OpenNamespace, the GetResultServices method must be called to retrieve the new IWbemServices pointer.
- For IWbemServices::PutInstance, the GetResultString method must be called to obtain the object path that was assigned to the object.
- For IWbemServices::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.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|
|Header||wbemcli.h (include Wbemidl.h)|