VintaSoft Twain .NET SDK 15.1: Documentation for Web developer
Vintasoft.Twain Namespace / WebTwainDeviceManagerJS type / getDevicesAsync Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
In This Topic
    getDevicesAsync Method
    In This Topic
    Sends an asynchronous request to get a list of TWAIN/SANE devices installed in the system.
    Syntax
    var instance = new Vintasoft.Twain.WebTwainDeviceManagerJS(service);
    
    var value; // Type: any
    
    // Parameters
    var successFunc; // Type: function
    var errorFunc; // Type: function
    
    value = instance.getDevicesAsync(successFunc, errorFunc);
    
    
    function getDevicesAsync(
    successFunc
    A function that will be executed if request is executed successfully.
    Function prototype: "successFunc(twainDeviceManager, twainDevices, defaultTwainDevice)", where 'twainDeviceManager' parameter is an instance of WebTwainDeviceManagerJS class, 'twainDevices' parameter is an array of instances of WebTwainDeviceJS class, 'defaultTwainDevice' parameter is an instance of WebTwainDeviceJS class.
    : Function,
    errorFunc
    A function that will be executed if request is failed.
    Function prototype: "errorFunc(twainDeviceManager, errorMessage)", where 'twainDeviceManager' parameter is an instance of WebTwainDeviceManagerJS 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(twainDeviceManager, twainDevices, defaultTwainDevice)", where 'twainDeviceManager' parameter is an instance of WebTwainDeviceManagerJS class, 'twainDevices' parameter is an array of instances of WebTwainDeviceJS class, 'defaultTwainDevice' parameter is an instance of WebTwainDeviceJS class.
    errorFunc
    A function that will be executed if request is failed.
    Function prototype: "errorFunc(twainDeviceManager, errorMessage)", where 'twainDeviceManager' parameter is an instance of WebTwainDeviceManagerJS class, 'errorMessage' parameter is string that describes error.
    Exceptions
    ExceptionDescription
    Thrown if TWAIN device manager is not opened OR information about TWAIN devices is not received.
    Remarks

    This function sends an asynchronous request to get a list of TWAIN devices installed in the system. If you want to use synchronous request instead of asynchronous request, please use WebTwainDeviceManagerJS.get_Devices and WebTwainDeviceManagerJS.get_DefaultDevice functions.

    Browser Compatibility
    9
    See Also