Does anybody know how to enumerate the used file-numbers [as in FileOpen(filenum, …)] in Visual Basic .NET 3.5 (VS2008)?
The situation is: I’m doing “a quick port” (just to bring it up a supported architecture) of an old VB6 WinForms application (it’s “just a tool” really, not a full-on app) to VB.NET using Visual Studio 2008’s automatic translator, over the .NET 3.5 framework. The existing code stores “records” in parallel arrays, the index of which is the output-file-number, and output-files are opened and closed “ad hoc”… so I can’t “just” use FreeFile (I could, but it’d basically be a rewrite, which we won’t get paid for).
After translating I’ve got an “invalid filename or number” error upon FileOpen’ing filenum=350 for Ouput… I know the filename is valid, and doesn’t already exist. I tried (just for debugging) setting filenum=FreeFile and that worked (i.e. the file was opened)… so I figure that filenum=350 is already open, but how to tell BY WHAT? A listing of the used filenums -> names would give a huge leg-up.
I suspect this just isn’t possible, but I’ve got to ask anyway, because it was save ever-so-much time, effort, and thought if it is possible, so here we are.
Cheers all. Keith.
I may be wrong here, but I don’t think that file numbers can be greater than 255.