[AccessD] WIAaut, Microsoft Windows Image Acquisition Automation Layer

Gustav Brock Gustav at cactus.dk
Sat Feb 19 14:35:17 CST 2005


Hi all

I'm having trouble with this. 

I have a scanner installed which works fine with the GUI and MS
Document Imaging etc. of Office 2003.
However, my code - taken from the sample around - will not count my
scanner.
No errors, just no count.
What is missing?

  Dim CommonDialog1 As Object
  Dim DeviceManager1 As Object
  Dim i As Integer

  Set DeviceManager1 = CreateObject("WIA.DeviceManager")
  Set CommonDialog1 = CreateObject("WIA.CommonDialog")

  For i = 1 To DeviceManager1.DeviceInfos.Count
    MsgBox DeviceManager1.DeviceInfos(i).Properties("Name").Value &
vbCrLf & _
      "(" & DeviceManager1.DeviceInfos(i).DeviceID & ")"
  Next

WiaAut.dll is even referenced correctly. I obtained it here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=a332a77a-01b8-4de6-91c2-b7ea32537e29&DisplayLang=en#filelist

The scanner is Agfa SnapScan 1236 via SCSI, old and a bit slow but OK.
OS is WinXP SP2.

/gustav



More information about the AccessD mailing list