Scan&Store Solution
Does anyone have a solution for Web Scan&Store module. For Win Application i used Twain Interface.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Lalit MRank #1,186 · 1.5K reputationPosted Nov 12, 2009, 10:50 PM EST
First step was to port the most important parts of TWAIN.H, these are found in TwainDefs.cs. The real logic for calling TWAIN is coded in the class
Twain, in file TwainLib.cs.. As the TWAIN API is exposed by the Windows DLL, twain_32.dll, we have to use the .NETDllImportmechanism for interop with legacy code. This DLL has the centralDSM_Entry(), ordinal #1 function exported as the entry point to TWAIN. This call has numerous parameters, and the last one is of variable type! It was found to be best if we declare multiple variants of the call like:[DllImport("twain_32.dll", EntryPoint="#1")] private static extern TwRC DSMparent( [In, Out] TwIdentity origin, IntPtr zeroptr, TwDG dg, TwDAT dat, TwMSG msg, ref IntPtr refptr );The
Twainclass has a simple 5-step interface:For some sort of 'callbacks', TWAIN uses special Windows messages, and these must be caught from the application-message-loop. In .NET, the only way found was
IMessageFilter.PreFilterMessage(), and this filter has to be activated with a call likeApplication.AddMessageFilter(). Within the filter method, we have to forward each message toTwain.PassMessage(), and we get a hint (enum TwainCommand) back for how we have to react.you can download code sample just few details register
Kurt Ambrose127 reputationPosted Mar 12, 2021, 10:57 AM EST
The LEADTOOLS SDK has a WebScanning solution which utilizes a service hosted on the client machine to interact with the TWAIN device that will provide the scanned image to the browser.
For more information please refer to the below link
https://www.leadtools.com/help/sdk/v21/dh/to/web-scanning-framework.html
There is also a live example at the below link
http://demo.leadtools.com/javascript/ScanningDemo/