The leading provider of version control solution and TWAIN SDK

How to implement Dynamic .NET TWAIN DLL in class library?

The license authentication mechanism of the current official version of Dynamic .NET TWAIN doesn't allow you to implement the component in a class library.You will get license error if you try to do so.

To meet our customers' requirements, an internal version of Dynamic .NET TWAIN which supports the above feature is now available!

Below please find the steps to make it work:

1. Get the FULL internal version of DynamicDotNetTWAIN.dll from Dynamsoft support team (nettwain@dynamsoft.com) if you are using v3.x.

If you are using v4.x, no internal version is needed. The official version already includes the feature.

2. Remove the old DLL and add the new one as Reference in your solution.



3. Check if there is a licenses.licx file under Properties folder. If so, please remove it.

4. Add the Dynamic .NET TWAIN license in your code, and customize the location and size of the control in the form.

Below please find a C# example:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NETTWAIN_Test_2011_12_31
{
    public partial class Form1 : Form
    {
        private Dynamsoft.DotNet.TWAIN.DynamicDotNetTwain twain = new Dynamsoft.DotNet.TWAIN.DynamicDotNetTwain("1C007F1253C878A72E36FF6BFC47F6F9");

        // Please input your Dynamic .NET TWAIN license, here "1C007F1253C878A72E36FF6BFC47F6F9" is a trial license which is good through Jan. 30th, 2012

        public Form1()
        {
            InitializeComponent();

            // Specify the location and the size of Dynamic .NET TWAIN control

            this.twain.Location = new System.Drawing.Point(45, 23);
            this.twain.Size = new System.Drawing.Size(150, 150);
            this.Controls.Add(twain);
        }

        private void button1_Click(object sender, EventArgs e)  // scan an image
        {
            twain.SelectSource();
            twain.OpenSource();
            twain.Resolution = 100;
            twain.IfShowUI = false;
            twain.IfFeederEnabled = false;
            twain.AcquireImage();
        }
    }
}


5. This way, you can implement Dynamic .NET TWAIN in your class library without having any license issue.

For any questions, please contact nettwain@dynamsoft.com.

PS:
Attached is a sample application of Dynamic .NET TWAIN Trial version (v3.x). You can have a try with the application.

Please update the license key if it expired.




Article Details

Last Updated
14th o May, 2012

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Related Articles

No related articles were found.

Attachments

Visitor Comments

No visitor comments posted. Post a comment

Post a comment

To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Name:
   Email:
* Comment:
* Enter the code below:
 

Continue