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?
can't use AcquiredImage methods when device.showUI=true
Moderator: Alex
Re: can't use AcquiredImage methods when device.showUI=true
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
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
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.
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
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
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
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
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
Thank you for comment - fixed.
Best regards, Alexander
Best regards, Alexander