IWbemCallResult::GetCallStatus method

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

lTimeout [in]

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.

plStatus [out]

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 table lists the value contained within an HRESULT.

Return codeDescription
WBEM_S_NO_ERROR

The call is complete, and plStatus has been assigned.

WBEM_S_TIMEDOUT

The object was not yet available before the lTimeout value expired.

WBEM_E_TRANSPORT_FAILURE

This indicates the failure of the remote procedure call (RPC) link between the current process and Windows Management.

WBEM_E_INVALID_PARAMETER

A specified parameter is not valid.

WBEM_E_FAILED

An unexpected system error has occurred.

 

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wbemcli.h (include Wbemidl.h)

See also

IWbemCallResult
IWbemServices::DeleteClass
IWbemServices::DeleteInstance
IWbemServices::ExecMethod
IWbemServices::GetObject
IWbemServices::OpenNamespace
IWbemServices::PutInstance

 

 

Show:
© 2014 Microsoft