Forum Replies Created
- AuthorPosts
That’s correct
Please describe the problem. In what Phase you get the problem? Can you scan but not get the image after?
On 64 bit machine:
32 bit DSM , located insyswow64, checks for 32 bit DS in twain_32 directory
64 bit DSM , located insystem32, checks for 64 bit DS in twain_64 directory On 32 bit machine:
32 bit DSM , located insystem32, checks for 32 bit DS in twain_32 directory 32bit TWAINDSM.DLL goes in
C:WindowsSysWOW6464 bit TWAINDSM.DLL goes in
C:WindowsSystem32TWAIN.DS files you get from scanner supplier
I checked the code and I do not see anything suspicious. It reads CAP_SUPPORTEDCAPS first, then it gets QUERYSUPPORT and then it gets the value with MSG_GET. All these operations should work on all TWAIN versions.
I would get TWAIN Sample App source code from SourceForge and check where it hangs.
Thanks for the info.
So there is no 64 bit twain driver that’s why you cannot see it in 64 bit TWAIN2 sample app.
The driver is based on old TWAIN spec. Probably TWAIN Sample app do a call which is not expected by the driver. When it lunches it gets all capabilities Supported/Current/Default values . I will reveiew the code and this week to see what it could be.TWAIN2 Sample GUI App – means 64 bit version?
TWAIN2 Sample GUI App 32bit – means 32 bit version?TWAINDSM – check the file version.
Can you check if you have multiple copies of old DataSourceManager (twain_32.dll) in your system? There should be only one in
directory. This can be an issue. CAP_UICONTROLLABLE is read only capability. CAP_UICONTROLLABLE =true is mandatory for 1.9 version and after.
Can you clarify these statements :
If I start TWAIN2 Sample Gui App, no camera is detected. If I start TWAIN2 Sample Gui App32-bit, my camera is detected.What version of TWAINDSM you have on your system?
SysWOW64TWAINDSM.dll VB6 or .NET?
To check the TWAIN Protocol – Start TWACKER, File/Message Level/Full, Click “Acquire”. You will see message DG_CONTROL/DAT_IDENTITY/MSG_OPENDS. ProtocolMajor/ProtocolMinor is the TWAIN specification which this driver follows.
To check if there is 64 bit version go to c:windowstwain_64 and look for file or directory with that camera name.I believe you see 1999 0000 because of the FIX32 structure is casted directly to INT32. It Whole=0, Frac=0x1999. It means the min and the step are 0.1= 0x1999/0x10000
Hi,
What is the driver’s TWAIN version?
Is it working when TWACKER is set in TWAIN 2.0 mode?
Do you have 64 bit TWAIN driver for this scanner?2.0 DSM will load 1.0 DSM if the DS is 1.x.
It is possible that you have multiple twain_32.dll in your system. The only allowed place is
, but not There is something wrong with the App. Message loop must be running between MSG_ENABLEDS and MSG_DISABLEDS. But you says that you wait for the messages after MSG_DISABLEDS
In the code you just posted, if MSG_REGISTER_CALLBACK succeeds gUSE_CALLBACKS will be false. It must me the opposite:
if(TWRC_SUCCESS != (twrc = DSM_Entry(DG_CONTROL, DAT_CALLBACK, MSG_REGISTER_CALLBACK, (TW_MEMREF)&callback)))
{
PrintCMDMessage("DG_CONTROL / DAT_CALLBACK / MSG_REGISTER_CALLBACK Failed: %un", twrc);
gUSE_CALLBACKS = false;
}
else
{
gUSE_CALLBACKS = true;
}
When coding TWAIN App into the DLL you have to assure that all calls to TWAIN DS come from one thread. The best way is to create your own thread. If you do not do this, then you have to block your App “Scan” call and create a loop (like one in OnBnClickedScan()) so you can transfer the messages to the DS.
- AuthorPosts