I'm having trouble reading a file. The file is a core file from Microsoft's now debunked but open source game Allegiance that was written in C/C++; I don't know C/C++. (On a side note: A few users kept the game alive and running, see http://www.freeallegiance.org/forums/index.php?act=home )

I have tried:

VB Code:
  1. Dim strText As String
  2.     Dim intFile   As Integer
  3.  
  4.     intFile = FreeFile()
  5.  
  6.     Open App.Path + "\dn_000450.igc" For Input As #intFile
  7.         MsgBox (LOF(intFile))
  8.         MsgBox (EOF(intFile))
  9.         strText = Input$(LOF(intFile), intFile)
  10.     Close #intFile
But it gives an error.

I have also tried:
VB Code:
  1. Dim sfile As String
  2. sfile = App.Path + "\dn_000450.igc"
  3. Dim myArray() As String
  4. ReDim myArray(0)
  5. Open sfile For Input As #1
  6. Do Until EOF(1)
  7.    Input #1, myArray(UBound(myArray))
  8.    ReDim Preserve myArray(UBound(myArray) + 1)
  9. Loop
  10. ReDim Preserve myArray(UBound(myArray) - 1)
  11. Close #1
  12. 'Check to see if everything was read
  13. For i = 0 To UBound(myArray())
  14. txt1.Text = txt1.Text & myArray(i)
  15. Next i
But it only appeared to read part of the file.

How do I read the file and extract usable data from it??


Additional information:

Currently I'm reading the .CSV file output from a program called CoreDump that was written in Python, but the current version is buggy and doesn’t output everything. Currently, I don't know any Python and would like to deal with just the one core file instead of the several CSV files that CoreDump outputs.

If anyone wants me to, I will post the Python source code to CoreDump.