Contact us


All times are UTC - 8 hours



   [ 3 posts ] 
Author Message
   


Joined: Mon Apr 27, 2015 6:09 am
Posts: 2
Hi,

I need to interface a scan with my WPF Telerik application. If it works, my company will buy some license package.

My problem is when I call the SelectSource or an other function (SelectSourceByIndex), an exception without any informations is catched :

I correctly add the reference to DynamicDotNetTWAIN.Wpf to my project (v5.4.0.929)

I create an object

Code:
private Dynamsoft.DotNet.TWAIN.Wpf.DynamicDotNetTwain m_scanTwain;


and init this one

Code:
m_scanTwain = new Dynamsoft.DotNet.TWAIN.Wpf.DynamicDotNetTwain();


and after it I try to initialize the scanner

Code:
           if(m_nSelectionMode == CameraConstants.AUTOMATIC)
            {
                m_scanTwain.OpenSourceManager();

                int count = m_scanTwain.SourceCount;

                for (short lngNum = 0; lngNum < count; lngNum++)
                {
                    if (m_scanTwain.SourceNameItems(lngNum) == "EPSON Perfection V800/V850")
                    {
                        m_scanTwain.SelectSourceByIndex(lngNum);
                        break;
                    }
                }
            }
            else if(m_nSelectionMode == CameraConstants.MANUAL)
            {
                try
                {
                    bResult = m_scanTwain.SelectSource();
                }
                catch(Exception ex)
                {
                   
                }
            }


I test this code in an other applications and it works without any problem. Do you have any idea of the problem origin ?

Thanks for your support,

Geoffroy


   


Joined: Mon Apr 27, 2015 6:09 am
Posts: 2
This is for the .net part of the forum, is it possible to move it ?


User avatar
   


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1706
Hi,

The issue has been resolved by email.

FYI,
Cause:
Quote:
It seems one of our APIs, which called ScanInNewProcess, is not very compatible with the Unmanaged Code Debugging.

Workaround:
Quote:
By commenting out the API in your code, the issue should be fixed. However, setting ScanInNewProcess to true is helpful to work better with scanner devices.

Or Resolution:
Quote:
Our team has fixed the issue and worked out an internal version. You can download the updated dlls breakdown here:

For .NET Framework 2.0:
http://www.dynamsoft.com/download/Suppo ... IN.Wpf.dll

For .NET Framework 4.0:
http://www.dynamsoft.com/download/Suppo ... IN.Wpf.dll

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


Display posts from previous:  Sort by  
   [ 3 posts ] 


Who is online

Users browsing this forum: rolandiw18 and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Copyright © 2018 Dynamsoft | All Rights Reserved
dynamic designed by Dynamsoft team
Fatal: Not able to open ./cache/data_global.php