Use Custom capabilities

To use a custom capability, you need to know what code represents this capability. To do this, you can follow the steps below:

  1. Install the TWAIN sample application
  1. Use the TWAIN Sample App to open the source and check what the code of the capability is. image025
  2. 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("Source doesn't support this capability");

Please refer to [PDF] How to perform Capability Negotiation for more details.

Is this page helpful?

Leave a Reply

Your email address will not be published.