VintaSoft Twain .NET SDK 15.1: Documentation for Web developer
Vintasoft.Twain Namespace / WebTwainDeviceJS type / setCapabilityAsync Methods / setCapabilityAsync(Vintasoft.Twain.WebDeviceCapabilityIdEnumJS,string,function,function) Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
    setCapabilityAsync(Vintasoft.Twain.WebDeviceCapabilityIdEnumJS,string,function,function) Method
    Sends an asynchronous request to set value of TWAIN device capability.
    Syntax
    var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName, productFamily, manufacturer, driverVersion, twainVersion, deviceManager, is64Bit);
    
    var value; // Type: any
    
    // Parameters
    var twainCapabilityId; // Type: WebDeviceCapabilityIdEnumJS
    var twainCapabilityValue; // Type: string
    var successFunc; // Type: function
    var errorFunc; // Type: function
    
    value = instance.setCapabilityAsync(twainCapabilityId, twainCapabilityValue, successFunc, errorFunc);
    
    

    Parameters

    twainCapabilityId
    An identifier of TWAIN device capability as an instance of WebDeviceCapabilityIdEnumJS class.
    twainCapabilityValue
    A string that represents value that should be set to the TWAIN device capability.
    successFunc
    A function that will be executed if request is executed successfully. Function prototype: "successFunc(twainDevice, capInfo)", where 'twainDevice' parameter is an instance of WebTwainDeviceJS class, 'capInfo' parameter is object that contains information about TWAIN device capabilities.
    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 arguments have wrong types OR device is not opened OR error occurs during setting value of device capability.
    Remarks

    This function sends an asynchronous request to set value of TWAIN device capability. If you want to use synchronous request instead of asynchronous request, please use WebTwainDeviceJS.setCapability function.

    Browser Compatibility
    9
    See Also