VintaSoft Twain .NET SDK v10.2
getDeviceCapability Method
Vintasoft.Twain Namespace > WebTwainDeviceJS type : getDeviceCapability Method
Integer value of device capability identifier OR instance of WebDeviceCapabilityIdJS.
Usage mode for TWAIN device capability value.
Function that will be executed if request is executed successfully.
Here is function prototype "function __success(data)".
The data parameter has the following properties:
Function that will be executed if request is failed.
Here is function prototype "function __error(data)".
The data parameter can be:
  1. An object with following properties:
    • errorMessage: Error message.
    • blocked: Indicates that the requested action is blocked by another request.
    if exception is catched inside web service.
  2. Otherwise, jqXHR object.
Sends an asynchronous request to a server for getting information about TWAIN device capability.
Syntax
var instance = new Vintasoft.Twain.WebTwainDeviceJS(deviceName,
                                                   productFamily,
                                                   manufacturer,
                                                   driverVersion,
                                                   twainVersion,
                                                   deviceManager);
var value; // Type: any

// Parameters
var twainCapabilityId; // Type:  object
var usageMode; // Type:  object
var successFunc; // Type:  object
var errorFunc; // Type:  object

value = instance.getDeviceCapability(twainCapabilityId, usageMode, successFunc, errorFunc);
function getDeviceCapability( 
   twainCapabilityId : object,
   usageMode : object,
   successFunc : object,
   errorFunc : object
) : any;

Parameters

twainCapabilityId
Integer value of device capability identifier OR instance of WebDeviceCapabilityIdJS.
usageMode
Usage mode for TWAIN device capability value.
successFunc
Function that will be executed if request is executed successfully.
Here is function prototype "function __success(data)".
The data parameter has the following properties:
  • capability: The value of TWAIN device capability.
    Value of TWAIN device capability is object with the following properties:
    • containerType: The container type of TWAIN device capability value.
    • valueType: The type of TWAIN device capability value.
    • value: The current value of TWAIN device capability value.
    • defaultValue: The default value of TWAIN device capability value.
    • minValue: The minimum value of TWAIN device capability value.
    • maxValue: The maximum value of TWAIN device capability value.
    • stepSize: The step size of TWAIN device capability value.
    • supportedValues: The supported values of TWAIN device capability value.
errorFunc
Function that will be executed if request is failed.
Here is function prototype "function __error(data)".
The data parameter can be:
  1. An object with following properties:
    • errorMessage: Error message.
    • blocked: Indicates that the requested action is blocked by another request.
    if exception is catched inside web service.
  2. Otherwise, jqXHR object.
Browser Compatibility
9
5
11
5
See Also

Reference

WebTwainDeviceJS type