I'm doing a recursive file search through a lot of documents (1000000+) for a client, depending on the document type/age/size/name/path the app may read the document.
this is the read code
Dim docprovider As New Doc.DocFormatProvider()
Using input As Stream = File.OpenRead(_fname)
Dim TxtFormatProvider As New TxtFormatProvider
text = TxtFormatProvider.Export(docprovider.Import(input))
End Using
Occasionally the app will hang waiting for the
TxtFormatProvider.Export(docprovider.Import(input))
Thread to return.
I'm guessing the input stream of the .doc file is malformed in someway, and I'm not really concerned about it, but how can I get the thread to quit so the app can go to the next file?