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

Questions, comments and suggestions concerning VintaSoftTwain.NET SDK.

Moderator: Alex

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

Postby tszanon » Fri Dec 10, 2010 6:18 pm

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?
tszanon
 
Posts: 3
Joined: Fri Dec 10, 2010 5:59 pm

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

Postby Alex » Sat Dec 11, 2010 7:08 am

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
Alex
Site Admin
 
Posts: 860
Joined: Thu Jul 10, 2008 11:21 am

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

Postby tszanon » Mon Dec 13, 2010 3:06 pm

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.
tszanon
 
Posts: 3
Joined: Fri Dec 10, 2010 5:59 pm

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

Postby Alex » Mon Dec 13, 2010 3:38 pm

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
Alex
Site Admin
 
Posts: 860
Joined: Thu Jul 10, 2008 11:21 am

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

Postby tszanon » Mon Dec 13, 2010 5:03 pm

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
tszanon
 
Posts: 3
Joined: Fri Dec 10, 2010 5:59 pm

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

Postby Alex » Wed Dec 15, 2010 2:25 pm

Thank you for comment - fixed.

Best regards, Alexander
Alex
Site Admin
 
Posts: 860
Joined: Thu Jul 10, 2008 11:21 am


Return to VintaSoftTwain.NET SDK Discussions

Who is online

Users browsing this forum: No registered users and 0 guests

cron