We have recently bought the document imaging sdk and we are trying to incoporate it in one of out multithreaded applications to do image processing.
here is a snippet of code that is executed within a threaded procedure:
Code: Select all
Private Sub ThreadLoadFiles()
Dim Imaging as New GdPicture.GdPictureImaging
Dim ImageID As Integer = 0
Dim PageCount As Integer = 0
Imaging.SetLicenseNumber("xxxxxxxxxxxxxxxxxxx")
For Each oneitem as string In filelist
ImageID = Imaging.CreateGdPictureImageFromFile(oneitem)
If ImageID <> 0 Then
'do some image processing
End If
Next
end sub
here are some of the errors we get:
A first chance exception of type 'System.IndexOutOfRangeException' occurred in GdPicture.NET.dll
A first chance exception of type 'System.NullReferenceException' occurred in GdPicture.NET.dll
When we get a nullregerenceexception .... if we re-execute the same line it usually works.
Is there something i am missing here?
Thank you