I Have a VB project which reads 5 images before in hand when the first image is loaded. i.e. we have something like lookadead.
Now while loading the image using ImageControl Version 8.31 i am getting an runtime error: -2147417848.
To read the 5 images i am using a For loop
for intcounter=1 to 5
LoadImage
Next
LoadImage code is specified below:
LoadImage(pobjImageControl As Object)
.
.
.
Call ReadImageFile()
.
.
With pobjImageControl
.Visible = False
.AutoScale = 2
.Tag = PackTag(udtTag)
.ImageDataSize = mlngCurrentLength
.hImageData = mlngBufferHandle
.Refresh
End With
In ReadImageFile i'll compute mlngCurrentLength from the recordset and mlngBufferHandle by calling GlobalAlloc.
Now while reading the images, we are sometimes getting while reading the first image only and sometimes at various other incounter's.
I can't debug the code also after getting the error since it's thrown by VB6 engine.
The place where it throws the error is while assigning the "mlngBufferHandle" to pobjImageControl.hImageData.
The same code works for ImageMan version 7 whereas its not working for Version 8.
Please can anyone shed some light on it.