Dynamic Web TWAIN: How to use custom capabilities of your TWAIN device

To use a custom capability of your TWAIN driver, you need to know what the capability code is first.
You can follow the steps below:

  1. Install the TWAIN sample application.
  2. Use the TWAIN Sample App to open the source and then check what the hexadecimal value of the capability is.

  3. As an example, the code 0x8001 is for the highlighted custom capability above. Now we can use the following code to negotiate the capability.

Code Snippet

    DWObject.Capability = 0x8001;
    DWObject.CapType = 5; //TWON_ONEVALUE
    DWObject.CapValue = 1;
    if (DWObject.CapSet())
       alert("Source doesn't support this capatiblity");



For more information, please refer to How to Perform Capability Negotiation.

Is this page helpful?

Leave a Reply

Your email address will not be published.