I have re-written a program that scans a document and reads a barcode from the document that was written in vb6 and worked on windows xp.
This new program works fine on windows 10 with an old fujitsu fi-4129c2 scanner but I cant get it to work with a new scanmate i1120 scanner.
The error I get is on the following line :
MyImage = DirectCast(ConnectedScanner.Items(1).Transfer(WIA.FormatID.wiaFormatBMP), WIA.ImageFile)
and the error I get is :
I know that the code works as I have it working with the fujitsu scanner but I cant seem to figure out what value is giving me the error on the scanmate.
I have just tried it with the following three lines of code only and it still gives me the same error :
Dim CD As New CommonDialog
Dim F As ImageFile = CD.ShowAcquireImage(WiaDeviceType.ScannerDeviceType)
F.SaveFile("C:\Temp\WIA." + F.FileExtension)