paul_so40, on 20 Apr, 2009 - 08:25 AM, said:
Ian2009, on 20 Apr, 2009 - 07:25 AM, said:
paul_so40, on 20 Apr, 2009 - 06:27 AM, said:
anyone think this is possible?
I am not familiar with index.dat but when i open it in notepad, all the URLs are in plain text. So you can just read in the file and use regular exp
ression to match the URLs then add them to your ListView. If you need more info, of course you need to know the structure of the file and then read it in binary format.
Yea that seems to make sence.
Have you got an example code?
still looking for one. . . getting know were
all i could find for reading a binary file is this
Dim binReader As New BinaryReader(File.OpenRead("c:\myfile.dat")) str = binReader.ReadString() num = binReader.ReadInt32() binReader.Close()
VS IDE has an Insert Snippet feature (right click from Code View), where you can find simple code snippets like this:
' to read binary file
Dim fileContents As Byte()
fileContents = My.Computer.FileSystem.ReadAllBytes("C:\Test.txt")
If the file you are dealing with is too large, you will want to read in chunks: such as Read(myArray, 0, 1000)
If you know the record structure, you can use ReadSingle(), ReadString(), ReadInt32() and read content into variables directly
check out the example code from MSDN:
http://msdn.microsof...naryreader.aspx
Hope it helps and good luck.
This post has been edited by Ian2009: 20 April 2009 - 09:13 AM