[Citrix] Error at opening the Data Source

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Moderator: Alex

Post Reply
vagtler
Posts: 2
Joined: Fri Aug 27, 2010 7:44 pm

[Citrix] Error at opening the Data Source

Post by vagtler » Fri Aug 27, 2010 7:51 pm

Hi,

we already sent an email yesterday to support@vintasoft.com but with no avail.

We have big problems scanning with VintaSoftTwain.NET SDK 6.0.5.1 under Citrix.

We always(!) get System.ApplicationException: Error communicating with the scanner device - Error at opening the Data Source. ---> Vintasoft.Twain.TwainException: Error at opening the Data Source.
at Vintasoft.Twain.VSTwain.OpenDataSource() messages

We just slightly modified your SimpleDemo of Visual Studio 2008 to select a TwainDLL.

Code: Select all

    public partial class Form1 : Form
    {
        public Form1() {
            var tgs = new TwainGlobalSettings();
            tgs.Register("[our company name]", "[our registered user email address]", “[our license number]”);
            InitializeComponent();
            twainDllFilenameEdit.Text = VSTwain1.TwainDllPath;
        }

        private void button1_Click(object sender, EventArgs e) {
            try {
                VSTwain1.StartDevice();
                if (VSTwain1.SelectSource()) {
                    VSTwain1.ShowUI = true;
                    VSTwain1.DisableAfterAcquire = false;
                    VSTwain1.Acquire();
                }
            }
            catch (Vintasoft.Twain.TwainException ex) {
                MessageBox.Show(ex.Message);
            }
        }

        private void button2_Click(object sender, EventArgs e) {
            try {
                VSTwain1.StartDevice();
                if (VSTwain1.SelectSource()) {
                    VSTwain1.ShowUI = false;
                    VSTwain1.DisableAfterAcquire = true;
                    VSTwain1.OpenDataSource();
                    VSTwain1.UnitOfMeasure = Vintasoft.Twain.UnitOfMeasure.Inches;
                    VSTwain1.PixelType = Vintasoft.Twain.PixelType.RGB;
                    VSTwain1.Acquire();
                }
            }
            catch (Vintasoft.Twain.TwainException ex) {
                MessageBox.Show(ex.Message);
            }
        }

        private void VSTwain1_ImageAcquired(object sender, EventArgs e) {
            if (pictureBox1.Image != null) {
                pictureBox1.Image.Dispose();
                pictureBox1.Image = null;
            }
            pictureBox1.Image = VSTwain1.GetCurrentImage();
        }

        private void VSTwain1_ScanCompleted(object sender, EventArgs e) {
            if (VSTwain1.ErrorCode != Vintasoft.Twain.ErrorCode.None)
                MessageBox.Show(VSTwain1.ErrorString);
            else
                MessageBox.Show("Scan completed.");
        }

        private void twainDllFilenameSelectButton_Click(object sender, EventArgs e) {
            openFileDialog1.InitialDirectory = Path.GetFullPath(VSTwain1.TwainDllPath);
            openFileDialog1.FileName = String.Empty;
            if (openFileDialog1.ShowDialog() == DialogResult.OK) {
                VSTwain1.TwainDllPath = openFileDialog1.FileName;
            }
            twainDllFilenameEdit.Text = VSTwain1.TwainDllPath;
        }
    }
}
We followed the guidelines given in the articles http://support.citrix.com/article/CTX123981 and http://support.citrix.com/article/CTX107409

Regarding to http://support.citrix.com/article/CTX107411: “If this issue is only happening with a 3rd party/custom application, obtain input from the application vendor to determine the process they take to acquire images with TWAIN.”

Scanning with other applications works without problems.

This is mission critical for us! Do you have any ideas?

Greetings

Robert

Alex
Site Admin
Posts: 1461
Joined: Thu Jul 10, 2008 2:21 pm

Re: [Citrix] Error at opening the Data Source

Post by Alex » Mon Aug 30, 2010 1:45 pm

Hello Robert,

Please try to use version 7.0 of SDK and let me know results.

Best regards, Alexander

vagtler
Posts: 2
Joined: Fri Aug 27, 2010 7:44 pm

Re: [Citrix] Error at opening the Data Source

Post by vagtler » Wed Sep 01, 2010 2:01 pm

Hi Alexander,

we upgraded to 7.0.1 and the problems are gone... ;)

Thanks!

Robert

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest