Monday, December 31, 2007

Visual Basic 6 Asynchronous File IO Using the .NET Framework

Visual Basic 6 Asynchronous File IO Using the .NET Framework
There are many applications that need to monitor directories and process incoming files. Files could appear as data exported from a legacy system, as FTP or HTTP uploads, or a variety of other sources. I set out to build an application in Visual Basic 6 that would process incoming files. The Visual Basic 6 application needed to satisfy the following requirements:
A directory monitored on a background thread: The application needed to remain responsive and unblocked while waiting for files to appear.
File contents loaded on a background thread so that the application would not be blocked while large files were being loaded.
Some processing of the file contents.