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.
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
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