[SDK] TWAIN device doesn't show in SDK. But does show in NAPS2 app #370
Replies: 3 comments 7 replies
-
What SDK version are you using? |
Beta Was this translation helpful? Give feedback.
-
Specifically, do you mean the list returned from What version of Windows and .NET? In the NAPS2 app, in your profile settings, under Advanced, do you have anything other than "Default" selected under Twain Implementation? Is the SDK running as a normal user application, not a service or anything like that? |
Beta Was this translation helpful? Give feedback.
-
Would love to get this working if you have any other suggestions. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I copied the TWAIN example from https://github.com/cyanfish/naps2/blob/master/NAPS2.Sdk.Samples/TwainSample.cs but my device isn't listed using
await controller.GetDeviceList(Driver.Twain)
. However, I am able to find and use the device in the NAPS2 app using TWAIN drivers.Side note: Using WIA,
GetDeviceList()
the scanner shows. But performing a scan causes an error. NAPS2 app throws this error below upon selection.System.InvalidCastException: Specified cast is not valid.
at IWiaItem2 NAPS2.Wia.Native.IWiaDevMgr2.SelectDeviceDlg(IntPtr hwndParent, int lDeviceType, int lFlags, ref string pbstrDeviceID)
at uint NAPS2.Wia.Native.NativeWiaMethods.SelectDevice2(IntPtr deviceManagerPtr, IntPtr hwnd, int deviceType, int flags, out string deviceId, out IntPtr device)
at WiaDevice NAPS2.Wia.WiaDeviceManager.PromptForDevice(IntPtr parentWindowHandle)
at T NAPS2.EtoForms.EtoInvoker.InvokeGet(Func func)+() => { }
at T NAPS2.EtoForms.EtoInvoker.InvokeGet(Func func)
at async Task NAPS2.Scan.ScanPerformer.PromptForDevice(ScanOptions options) x 2
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions