Home › Forums › TWAIN Classic › AppId.ProductName is empty
- This topic has 1 reply, 2 voices, and was last updated 9 years, 4 months ago by MarkM.
- AuthorPosts
After a long time search I could not find any answer for my question. I try to use Twain for scanning. My application works correctly in x86 mode. But for some reason, I’m now forced to switch to “AnyCPU“. So that I’m trying to use new ‘TWAINDSM.dll‘ instead of ‘twain_32.dll‘. But it fails while initializing: “
TwRC.Failure
” in:
TwainNative.DSMparent(this._Appid, IntPtr.Zero, TwDG.Control, TwDAT.Parent, TwMSG.OpenDSM, ref hwndp);
which _Appid is
this._Appid = new TwIdentity
{
Id = IntPtr.Zero,
Version = {MajorNum = 1, MinorNum = 1, Language = LanguageUSA, Country = CountryUSA, Info = "Mohammad"},
ProtocolMajor = TwProtocol.Major,
ProtocolMinor = TwProtocol.Minor,
SupportedGroups = (int)(TwDG.Image | TwDG.Control),
Manufacturer = "Kod Efisien Sdn Bhd",
ProductFamily = "TWAIN 32 Scanner",
ProductName = "ScanSoft"
};[151040065 dsm.cpp 399 183 0000000000002174] TWAIN Working Group
[151040065 dsm.cpp 400 183 0000000000002174] TWAIN 64 Source Manager (Image Acquisition Interface)
[151040065 dsm.cpp 401 183 0000000000002174] version: 2, 3, 0, 0
[151040065 dsm.cpp 2368 183 0000000000002174] -> DSM
[151040065 dsm.cpp 2377 183 0000000000002174] DG_CONTROL/DAT_PARENT/MSG_OPENDSM
[151040065 apps.cpp 347 183 0000000000002174] AppId.ProductName is empty
[151040065 apps.cpp 654 183 0000000000002174] Condition Code: Data parameter out of range
[151040065 dsm.cpp 2432 183 0000000000002174] TWRC_FAILURE
Thanks for any help.
In AnyCPU mode the TWAIN driver must match the processor word size, which means that you must have a native 64-bit TWAIN driver (as opposed to 32-bit running on 64-bit systems). Check out the list of certified drivers on the TWAIN website for a list of scanners that support native 64-bit.
- AuthorPosts