Page 1 of 1

can't use AcquiredImage methods when device.showUI=true

Posted: Fri Dec 10, 2010 9:18 pm
by tszanon
I'm having problems when setting device.showUI=true.
In ImageAcquired event, I can assign the image acquired to a variable, but I can't use it:
Dim img as AcquiredImage
img = e.Image ' OR img = device.AcquiredImages(0), both work fine

But I can't call any method of that image. Whatever I try, I get the very same error message: "Attempted to read or write protected memory".
Can't deskew, despeckle, detect border, save to stream, nothing. Whatever I try, that error is fired.

If I set device.showUI = false, everything works fine.

Scanner: Fujitsu fi-6140
Version: VintaSoftTwain.NET SDK 7.0

What may be happening?

Re: can't use AcquiredImage methods when device.showUI=true

Posted: Sat Dec 11, 2010 10:08 am
by Alex
Hello,

I think the AcquiredImage object is disposed when you use it. Please read description of the Capability property of the AcquiredImageCollection class in the documentation. We will add the Disposed property to the AcquiredImage class in next version of SDK.

Best regards, Alexander

Re: can't use AcquiredImage methods when device.showUI=true

Posted: Mon Dec 13, 2010 6:06 pm
by tszanon
Hello Alex,

According to the debug tool in Visual Studio, the AcquiredImage object wasn't disposed. Maybe some private property may have been disposed, but the object itself is ok.

Capability property of the AcquiredImageCollection? According to the documentation I have, there's no Capability property there, nor Visual Studio finds it...maybe there's a newer version of the library than the one I'm currently using? I'll check it out.

What really bugs me is that the very same code works perfectly if I just set device.showUI=false. It doesn't make any sense to me.
Is there anything else I should check? I'm kind of lost.

Thanks for your help.

Re: can't use AcquiredImage methods when device.showUI=true

Posted: Mon Dec 13, 2010 6:38 pm
by Alex
Hello,

AcquiredImage class has the Disposed property since version 7.0.23.1 of SDK, please use this version and try to find the problem.

Send the project which demonstrates your problem to support@vintasoft.com if you cannot solve the problem.

Best regards, Alexander

Re: can't use AcquiredImage methods when device.showUI=true

Posted: Mon Dec 13, 2010 8:03 pm
by tszanon
Indeed, the old version I was using was causing the problem. Updating the library corrected this problem.
Thanks!

P.S. It seems the download page is wrong, it says it's version 7.0.21.1

Re: can't use AcquiredImage methods when device.showUI=true

Posted: Wed Dec 15, 2010 5:25 pm
by Alex
Thank you for comment - fixed.

Best regards, Alexander