result = lib.wdGetStringScriptResult(scriptResult, message);
errors.verifyErrorCode(result, "Cannot extract string result");
throw new WebDriverException(new StringWrapper(lib, message).toString());
case IeReturnTypes.DOUBLE: // Double
DoubleByReference doubleVal = new DoubleByReference();
result = lib.wdGetDoubleScriptResult(scriptResult, doubleVal);
errors.verifyErrorCode(result, "Cannot extract double result");
toReturn = doubleVal.getValue();
break;
case IeReturnTypes.ARRAY: // Array
IntByReference arrayLength = new IntByReference();
result = lib.wdGetArrayLengthScriptResult(