vb.net - Driver, COMException errors -
I am using the following code to scan documents:
slow Manager = New device manager at Deviceinfo = manager.DeviceInfos.Cast (DeviceInfo's) (). FirstOrDefault (function (D) di.Properties ("name"). Value = deviceName) If the device is not an interface then exit the apple dim device device = deviceinfo.Connect Dim dlg = new common dialog item item = .ite item (1) Properties ("bits per pixel") Value = 1 item Properties ("Horizontal Resolution") Value = 200 items. Properties ("Vertical Resolution") .Value = 200 Dim img ImageFile = dlg.ShowTransfer (item, FormatID.wiaFormatTIFF, False)
In the last line, I get 2 different error codes I sometimes get me 0x8021000E
, which, according to the page, means a WIA_ERROR_EXCEPTION_IN_DRIVER
error.
Sometimes I get COMException, according to Remote Procedure Call 0x800706 BE % windir% \ debug \ wiatrace.log
which contains this information. But it does not give me anything more than the actual error.
This program is running on Windows 7 Professional 64-bit. WIA service is in progress.
What steps can I take to resolve this problem?
1) I had a reference to the WIA DLL as if it was not a system COM DLL but an external DLL Was there. This change com exception solution
2) WIA driver exceptionally apparently because I was clearly establishing resolution values for 200. Without that, the scanning is released properly.
On, this DPI is recommended to set 150 or 300 or more, and some scanners have a problem with less than 300 DPI. (I will update this reply once I check it.)
Comments
Post a Comment