I try to acquire image from scanner using the code below
Dim CD As New WIA.CommonDialog
Dim F As WIA.ImageFile = CD.ShowAcquireImage(WIA.WiaDeviceType.UnspecifiedDeviceType)
F.SaveFile("C:\Temp\WIA\" + F.FileExtension)
But it produce me this error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Test.exe
Additional information: Error HRESULT E_FAIL has been returned from a call to a COM component.
Help help.
First you need to find the scanner you want to use :
then you take the picture :
Hope this help.
Refer to this Link From More Info Windows Image Acquisition
Edit Add reference to your project
wiaaut.dll
you can find it onC:\Windows\system32
. AndImports WIA
to your class.