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

Aux_MSIL problem

Nov 24, 2016 at 8:46 AM
Hi,

I have a problem with Saraff.Twain.OutprocSample4.

This part of code throws an exception.
 TwainExternalProcess.Execute(
                    Path.Combine(Path.GetDirectoryName(this.GetType().Assembly.Location), Form1._msilAux),
                    twain =>
                    {
                        try
                        {
                            if (!Environment.Is64BitOperatingSystem && !twain.IsTwain2Supported)
                            {
                                return;
                            }
                            for (var i = 0; i < twain.SourcesCount; i++)
                            {
                                _result.Add(new DS
                                {
                                    Id = i,
                                    Identity = twain.GetSourceIdentity(i),
                                    IsX86 = !Environment.Is64BitOperatingSystem,
                                    IsTwain2 = twain.IsTwain2Supported
                                });
                            }
                        }
                        catch (Exception ex)
                        {
                            this._ShowError(ex);
                        }
                    });

  • Exception thrown: 'System.InvalidOperationException' in Saraff.Twain.Aux.dll ("Operation is not valid due to the current state of the object.") System.InvalidOperationException
The scanner that I am using is fujitsu fi-6130. And I think that I don't have 64bit driver
Coordinator
Nov 24, 2016 at 5:32 PM
Hello, icefragment.
Try copy Saraff.Twain.Aux_MSIL.exe and Saraff.Twain.Aux_x86.exe to a output directory of a Saraff.Twain.OutprocSample4 project (Saraff.Twain.OutprocSample4/bin/debug).
Marked as answer by SARAFF on 12/3/2016 at 1:53 PM