setCapabilityAsync(Vintasoft.Twain.WebDeviceCapabilityIdEnumJS,string,function,function) Method
In This Topic
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
Exception | Description |
| 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
See Also