VB.Net with using twain_32.dll

G

Guest

I am making progress with my vb.net app. However, I can't seem to find a
way to detect if the feeder is loaded. This is used by my scanner to
determine if there is a sheet in the feeder.

If I launch my application and attempt to acquire a scan, I would like the
program to loop until a sheet is loaded before it attempts to make the
actual scan. The best way to do this is to periodically test to see if
there is a sheet in the feeder... So, a few questions:

- Do I need to initialize the capability like the following example that
initialized transfer count (if so, how?):
Dim cap As TwCapability = New TwCapability(TwCap.XferCount, 1)
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap)

- Can anyone tell me which function (and how to call it) from the
twain_32.dll? I thought it might be DSstatus but I am not sure...

- Where exactly should the return code be found? but I can seem to get
the function to return any value. other than its Hex value (4099, H1003)
I should get a true or false (true if there is a sheet in the feeder).

Any help would be appreciated. Thanks - DLT
 
K

Ken Tucker [MVP]

Hi,

http://www.1aspstreet.com/vb/scripts/ShowCode.asp?txtCodeId=1551&lngWId=10


Ken
--------------------
I am making progress with my vb.net app. However, I can't seem to find a
way to detect if the feeder is loaded. This is used by my scanner to
determine if there is a sheet in the feeder.

If I launch my application and attempt to acquire a scan, I would like the
program to loop until a sheet is loaded before it attempts to make the
actual scan. The best way to do this is to periodically test to see if
there is a sheet in the feeder... So, a few questions:

- Do I need to initialize the capability like the following example that
initialized transfer count (if so, how?):
Dim cap As TwCapability = New TwCapability(TwCap.XferCount, 1)
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap)

- Can anyone tell me which function (and how to call it) from the
twain_32.dll? I thought it might be DSstatus but I am not sure...

- Where exactly should the return code be found? but I can seem to get
the function to return any value. other than its Hex value (4099, H1003)
I should get a true or false (true if there is a sheet in the feeder).

Any help would be appreciated. Thanks - DLT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top