Home › Forums › TWAIN Classic › Twain on Linux (Centos 7)
- This topic has 3 replies, 2 voices, and was last updated 7 years, 8 months ago by kaiserovich.
- AuthorPosts
Hello, everyone. I have scanner Epson Perfection V600 Photo, and I am trying to write program which scans documents on Windows 7_64 and Linux (I am using Centos 7_64). I used your source file, which was very helpful for me, and It perfectly worked for Win7_64. Then, I wanted to make it works on Centos 7; however, program cannot find Data Sources. Here my steps.
1 Step:
ret = DSM_Entry(
&(m_MyInfo),
0,
DG_CONTROL,
DAT_PARENT,
MSG_OPENDSM,
(TW_MEMREF)&m_Parent);ret has TWRC_SUCCESS state
2 Step:
ret = DSM_Entry(
&(m_MyInfo),
0,
DG_CONTROL,
DAT_ENTRYPOINT,
MSG_GET,
(pTW_ENTRYPOINT)&g_DSM_Entry)ret has TWRC_SUCCESS state
3 Step:
ret = DSM_Entry(
&m_MyInfo,
0,
DG_CONTROL,
DAT_IDENTITY,
MSG_GETFIRST,
(TW_MEMREF) &Source);ret has TWRC_ENDOFLIST state
As you can see DSM_Entry on third step returned TWRC_ENDOFLIST state. Specification says: “Note: The application must invoke the MSG_GETFIRST operation before a MSG_GETNEXT operation. If the MSG_GET NEXT is invoked first, the Source Manager will fail the operation (TWRC_ENDOFLIST).” (specification)
So here I am confused, and I don’t understand why that function return TWRC_ENDOFLIST state. I use Qt Creator and make my program on C++. And as I said, this program works fine on Win7_64.
I will appreciate any help, let me know if you need more information.
Does anyone know how to create DataSources file in Linux (*.ds)?
Twain doesnt support Linux OS. If you want to make application for scaners on Linux – use SANE backends, and all you need is just read very simple specification, so you can make your frontend app. Topic can be closed.
@kaiserovich wrote:
Twain doesnt support Linux OS…
The TWAIN protocol and Data Source Manager are supported on Linux. What’s missing is apps and drivers, though some do exist (e.g. https://www.google.com/#q=kodak+scantwain)
It’s a chicken and egg situation. There are so few TWAIN drivers available on Linux that app developers see little use for it. Likewise, since there are so few TWAIN apps, hardware vendors usually won’t bother to create a driver.
As you’ve discovered, SANE is to Linux as TWAIN is to Windows.
–- AuthorPosts