Home › Forums › TWAIN Classic › Twain 2 and wiatwain.ds
- This topic has 5 replies, 3 voices, and was last updated 10 years, 9 months ago by rich.compton.
- AuthorPosts
I am currently writing an application that will allow the user to use twain devices. I am basing it on the twain 2 DSM. I see in th twain_32 folder my current twain compatible devices as well as wiatwain.ds. I am assuming the latter is suppose to give me access to wia compatible devices. I have read that WIA is suppose to have a twain layer. The problem is that the wiatrain.ds fails to load with the following in the logs
[095426057 apps.cpp 1375 127 00001AA4] Could not find DS_Entry function in DS: C:Windowstwain_32wiatwain.ds
[095426057 apps.cpp 645 127 00001AA4] Condition Code: DS or DSM reported error, application shouldn’t
Does anyone have an idea why? I used dependancy walker on wiatwain.ds and don’t see the entry point. What is going on?? I have read in other threads that the wiatwain.ds is not standard. How am I suppose to use it? Do I have to manually use the wia api to use wia devices??
Hi Rich – you aren’t by any chance trying to load wiatwain.ds directly, are you?
That’s a virtual TWAIN driver used by Microsoft to implement the TWAIN-to-WIA bridge.
Your program never does anything with it directly. I believe, when you open a TWAIN device whose name starts with “WIA-“, that you are actually talking to that module, and it’s emulating a TWAIN driver while talking to WIA on the other side.My advice:
Make your program work while talking to twain_32.dll, in 32-bit mode. Then you know your app works.
Only then, you can try using TWAINDSM.dll (in 32-bit mode) to see if any problems crop up.
And then you can try 64-bit, but you’ll have to hunt around to find drivers that appear in 64-bit mode.Thanks for the input.
I am not loading that file manually. When I get the DSM to loaded devices it tries the wiatwain.ds and fails.
I will try what you say and try get my app to work with twain_32. I currently have it 90% with twaindsm. Only wia and USB2800 devices don’t seem to be working.
Hi Rich – I’ll take a look at your USB2800 question.
If the wiatwain.ds behavior is different with twain_32.ds, please post back here and we’ll pass this along to the TWAINDSM maintainers for investigation.I have the same effect here on Windows 7 after installing the TWAINDSM.dll of the twaindsm-2.2.1.win.bin.zip file. The message in the log file indicates that TWAINDSM.dll is looking for the DS_Entry by name, while in old times (read: before TWAIN 2.0) the entry point of a data source was required to be available through the MAKEINTRESOURCE(1) macro, i.e. it had to be the first entry in the data source export list.
To me it looks like TWAINDSM.dll is not checking for the DS_Entry in this pre 2.0 way and thus fails to load data sources that were compiled using a twain.h of versions before 2.0. Now I am forced to fall back to loading TWAIN_32.dll instead, or I won’t be able to open old data sources.
Sorry for the delay, we just held off on WIA integration for a bit. I can confirm that it loads with the older twain_32 but still no luck with twaindsm. Any news on this??
- AuthorPosts