Name
ErrorIndicatesFailure
Description
HRESULT
ErrorIndicatesFailure([in] ULONGLONG err,
[out,retval] VARIANT_BOOL* isFailure);
Determines if the error value returned by a VIX function indicates that
a failure occurred.
Parameters
- err
-
An error value returned from a VIX functions.
- isFailure
-
Returns whether the operation that returned 'err' was a failure.
Return Value
HRESULT
Remarks
- This is the preferred way to determine if a error occurred during a call
to a VIX function.
- To get the error code that represents the specific type of error that occurred,
use VixLib::ErrorCode().
Side Effects
None.
Requirements
VixCOM.h, since VMware Workstation 6.0.
Example
In VBScript:
Dim job
Dim err
' Power on the virtual machine in headless mode.
Set job = vm.PowerOn(VixCOM.Constants.VIX_POWEROP_NORMAL, Nothing, Nothing)
err = job.WaitWithoutResults()
If lib.ErrorIndicatesFailure(err) Then
' Handle error...
End If