我有一个带ADF的兄弟扫描仪。 ADF在win传真和扫描中运行良好,但是当我通过WIA访问它时,我尝试将馈线设置为1.问题是,在迭代属性id时,它永远不会达到3078.
以下是它公开的ID列表
4098,4099,4101,4102,4103,4104,4105,4106,4107,4108,4109,
4110,4111,4112,4113,4114,4116,4118,4120,4123,6146,6147,
6148,6149,6150,6151,6152,6153,6154,6155,6156,6157,6159,6161
这是我的代码
Dim cl = New CommonDialog
Dim scanner = cl.ShowSelectDevice(WiaDeviceType.ScannerDeviceType, False, False).Items(1)
Dim ids = (From x As WIA.Property In scanner.Properties Select x.PropertyID).ToList
ids.Sort()
MessageBox.Show(ids.Joined)
For Each prp As WIA.Property In scanner.Properties
Dim iprp = CType(prp, IProperty)
Select Case prp.PropertyID
Case 3078
MessageBox.Show("going to set " & prp.PropertyID)
iprp.let_Value(1)
End Select
Next
任何想法?
我没有被WIA锁定,如果有更好的图书馆,我会感兴趣。
答案 0 :(得分:0)
答案是这个优秀的图书馆:http://code.google.com/p/twaindotnet/
就像一个魅力
答案 1 :(得分:0)
问题在于:
Dim scanner = cl.ShowSelectDevice(WiaDeviceType.ScannerDeviceType, False, False).Items(1);
您尝试联系的酒店位于此处:
cl.ShowSelectDevice(WiaDeviceType.ScannerDeviceType, False, False);