HRESULT ErrorIndicatesSuccess([in] ULONGLONG err, [out,retval] VARIANT_BOOL* isSuccess);
Determines if the error value returned by a VIX function indicates that the function call completed successfully.
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.ErrorIndicatesSuccess(err) Then ' Perform some operation on the powered on virtual machine... End If