IWbemCallResult::GetResultObject method (wbemcli.h)
The IWbemCallResult::GetResultObject method attempts to retrieve an object from a previous semisynchronous call to IWbemServices::GetObject or IWbemServices::ExecMethod. If the object is not yet available, the call returns WBEM_S_TIMEDOUT. Also, before invoking this method to get the resulting object, you may call IWbemCallResult::GetCallStatus until it returns WBEM_S_NO_ERROR, indicating that the original semisynchronous operation is complete.
HRESULT GetResultObject(
[in] long lTimeout,
[out] IWbemClassObject **ppResultObject
);
[in] lTimeout
Specifies the maximum time in milliseconds that this call blocks before returning. If you use the constant WBEM_INFINITE (0xFFFFFFFF), the call blocks until the object is available. If you use 0, the call immediately returns either the object or a status code.
[out] ppResultObject
This parameter cannot be NULL. It receives the copy of the object when it becomes available. You must call IWbemClassObject::Release on the returned object when the object is no longer required. A new object is not returned on error.
This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an HRESULT.
If the original semisynchronous operation failed (such as when the object was not found, or the method could not be invoked), this method returns the error code that the original function would have returned in its synchronous version.
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.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | wbemcli.h (include Wbemidl.h) |