To use a custom capability, you need to know what code represents this capability. To do this, you can follow the steps below:
- Install the TWAIN sample application
- 32-bit: http://www.dynamsoft.com/download/support/twainapp.win32.installer.msi
- 64-bit: http://www.dynamsoft.com/download/support/twainapp.win64.installer.msi
- Use the TWAIN Sample App to open the source and check what the code of the capability is.
- In the above example, code "0x8001" is the hexadecimal value for the highlighted custom capability. Now, we can use the code to negotiate the capability with the scanner driver:
DWObject.Capability = 0x8001; /* TWON_ONEVALUE */ DWObject.CapType = EnumDWT_CapType.TWON_ONEVALUE; DWObject.CapValue = 1; if (DWObject.CapSet()) alert("Successful"); else alert("Source doesn't support this capability");
Please refer to [PDF] How to perform Capability Negotiation for more details.