Copy of How to use custom capability in Dynamic .NET TWAIN

Since version 3.0.0.3, Dynamic .NET TWAIN supports custom capability.

To use a custom capability, you need to know what is the capability code. Please follow the steps below:

1. Install the TWAIN sample application (32-bit, 64-bit).

2. Use the TWAIN Sample application to open the source. then check what is the hexadecimal value of the capability.

3. As an example, the code is 0x8001 for this custom capability. Now we refer to the code below on how to set the value:

dynamicDotNetTwain.SelectSource();
dynamicDotNetTwain.OpenSource();
dynamicDotNetTwain.Capability = (Dynamsoft.DotNet.TWAIN.Enums.TWCapability)0x8001;
bool bRet = dynamicDotNetTwain.CapGet();
double db = dynamicDotNetTwain.CapValue;
dynamicDotNetTwain.Capability = (Dynamsoft.DotNet.TWAIN.Enums.TWCapability)0x8001;
dynamicDotNetTwain.CapValue = 1;
dynamicDotNetTwain.CapType = Dynamsoft.DotNet.TWAIN.Enums.TWCapType.TWON_ONEVALUE;
bRet = dynamicDotNetTwain.CapSet();
dynamicDotNetTwain.Capability = (Dynamsoft.DotNet.TWAIN.Enums.TWCapability)0x8001;
dynamicDotNetTwain.CapValue = 0;
bRet = dynamicDotNetTwain.CapGet();

db = dynamicDotNetTwain.CapValue;