File in use after appending tif page
Posted: Tue May 31, 2011 11:21 pm
I'm getting a file in use when tring to delete the file I am appending. I've tried disposing the tif object but this crashes the app.
[/color]
Any ideas?
Code: Select all
Private Function AppendPage(ByVal sourceFile As String, ByVal newPage As String) As Boolean
Dim tif As New Vintasoft.Imaging.Codecs.Tiff.TiffFile(sourceFile)
Try
tif.Pages.Add(New VintasoftImage(newPage))
tif.SaveChanges()
Catch ex As Exception
Throw
End Try
Return True
End Function
' Subsequent delete generates the error:
IO.File.Delete(newPage)
Any ideas?