VintaSoft Twain .NET SDK 15.0: Documentation for Web developer
Vintasoft.Twain Namespace / WebTwainDeviceJS type / acquireModalAsync Methods / acquireModalAsync(function,function) Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
In This Topic
    acquireModalAsync(function,function) Method
    In This Topic
    Sends an asynchronous request to do one step of synchronous image acquisition from TWAIN/SANE device. Response for image acquisition progress is not generated.
    Syntax
    var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
    
    var value; // Type: any
    
    // Parameters
    var successFunc; // Type: function
    var errorFunc; // Type: function
    
    value = instance.acquireModalAsync(successFunc, errorFunc);
    
    
    function acquireModalAsync(
    successFunc
    A function that will be executed if request is executed successfully.
    Function prototype: "successFunc(twainDevice, acquireModalResult)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'acquireModalResult' parameter is an instance of WebTwainDeviceAcquireModalResultJS class.
    : Function,
    errorFunc
    A function that will be executed if request is failed.
    Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'errorMessage' parameter is string that describes error.
    : Function
    ) : any;

    Parameters

    successFunc
    A function that will be executed if request is executed successfully.
    Function prototype: "successFunc(twainDevice, acquireModalResult)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'acquireModalResult' parameter is an instance of WebTwainDeviceAcquireModalResultJS class.
    errorFunc
    A function that will be executed if request is failed.
    Function prototype: "errorFunc(twainDevice, errorMessage)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'errorMessage' parameter is string that describes error.
    Exceptions
    ExceptionDescription
    Thrown if device is not opened OR error occurs during one step of synchronous image acquisition.
    Remarks

    This function sends an asynchronous request to do one step of synchronous image acquisition from TWAIN device. If you want to use synchronous request instead of asynchronous request, please use WebTwainDeviceJS.acquireModalSync function.

    Browser Compatibility
    9
    See Also