Forum Replies Created
- AuthorPosts
This fails;
TwCapability cap1 = new TwCapability(TwCap.CAP_FEEDERLOADED,1);
// query the scanner for the current value of the capability:
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Get, cap1);
if (rc != TwRC.Success)
{
// something's wrong
CloseSrc();
return;
}Their orig code works tho, but it doesnt use teh CAP_FeederLoaded
TwCapability cap = new TwCapability(TwCap.XferCount, 1);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);
if (rc != TwRC.Success)
{
CloseSrc();
return;
}
Might just leave it as the orig code and have the users just click a button…
Thanks, let me try your code snippet and see what happens. Will look at your recommendations as well. thanks.
>>CodeProject is kind of a hack – minimal comments, and almost everything done in-line
do u have another code that you use?
Thanks, let me try. Hope this works. I’ll post back.
Do you have an example of this:
>>open the scanner and poll the scanner for feeder loaded (ICAP_FEEDERLOADED) and when it shows true
how do i open the scanner via code? with “Acquire” command?
I am back this topic again and I don’t understand how this works..
I added this to the code that I got from that link:
internal enum TwCap : short
{
XferCount = 0x0001, // CAP_XFERCOUNT
ICompression = 0x0100, // ICAP_…
IPixelType = 0x0101,
IUnits = 0x0102,
CAP_FEEDERLOADED = 0x1003,
IXferMech = 0x0103
}now, in the code I have this which doesnt work:
while(true)
{
while (TwCap.CAP_FEEDERLOADED )
{}
}— i get an error that TwCap.Cap_FeederLoaded cannot be converted to Bool…
Not sure how to use this to check for scanner being ready to scan…
let me try this. Thanks.
let me look into this. thanks.
- AuthorPosts