This project has moved. For the latest updates, please go here.

Rotation and undefined capability

Jun 2, 2014 at 6:05 PM

Im trying to use the Rotation capability
    private void button1_Click(object sender,EventArgs e) {
        try {
            this._twain.SetCap(TwCap.FeederEnabled, true);
            this._twain.SetCap(TwCap.Rotation, 1);

        } catch(TwainException ex) {
But im getting an error: Data parameter out of range.
Am i using it wrong?

And another question, can i use the SetCap method to set a capability that is not defined in TWCap. Or do i have to define the code inside TWCap?
Jun 2, 2014 at 7:20 PM
Hello, microft.
By the first part of the question. See TWAIN specification:
Try follow code:
this._twain.SetCap(TwCap.Rotation, 1f);
By the second part of the question. What a capability do you miss?
You can use the following code:
this._twain.SetCap((TwCap)0x1002 /*capability code*/, value);
Marked as answer by SARAFF on 6/23/2014 at 12:22 PM
Jun 3, 2014 at 1:57 PM
Thanks, worked perfectly.

I needed to use some capablities used by the scanner im working with. Its a Canon DR-6010C.

Thanks again.