VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 300,326 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,976 people online right now. Registration is fast and FREE... Join Now!




index.dat

 

index.dat

paul_so40

19 Apr, 2009 - 03:58 PM
Post #1

New D.I.C Head
*

Joined: 15 Apr, 2009
Posts: 40

Hello all,

Ok so ive dug round the internet hunting for the un-findable

i have a listveiw called lv

what i want is to be able to list the contents of index.dat file in "lv"

Is this possible?

ive dug round the internet and all i can find is "free download softwares" and "history cleaners exe"

im looking for the source, anyone got an idea of what the code would be?

For those that dont know,
QUOTE
In the Microsoft Windows operating system, index.dat is a file used by the Internet Explorer web browser. Index.dat files are hidden files on your computer that contain all tracks of your online activity, where have you been on internet, what sites you visited, list of URLs, files and documents you recently accessed. Index.dat files stored on your computer are obviously a potential privacy threat as they can be found and viewed without your knowledge.


Any help would be great.

This post has been edited by paul_so40: 19 Apr, 2009 - 04:03 PM

User is offlineProfile CardPM
+Quote Post


paul_so40

RE: Index.dat

20 Apr, 2009 - 06:27 AM
Post #2

New D.I.C Head
*

Joined: 15 Apr, 2009
Posts: 40

anyone think this is possible?
User is offlineProfile CardPM
+Quote Post

Ian2009

RE: Index.dat

20 Apr, 2009 - 07:25 AM
Post #3

New D.I.C Head
*

Joined: 7 Apr, 2009
Posts: 31



Thanked: 7 times
My Contributions
QUOTE(paul_so40 @ 20 Apr, 2009 - 06:27 AM) *

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 expression 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.


User is offlineProfile CardPM
+Quote Post

paul_so40

RE: Index.dat

20 Apr, 2009 - 08:25 AM
Post #4

New D.I.C Head
*

Joined: 15 Apr, 2009
Posts: 40

QUOTE(Ian2009 @ 20 Apr, 2009 - 07:25 AM) *

QUOTE(paul_so40 @ 20 Apr, 2009 - 06:27 AM) *

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 expression 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

CODE
Dim binReader As New BinaryReader(File.OpenRead("c:\myfile.dat")) str = binReader.ReadString() num = binReader.ReadInt32() binReader.Close()

User is offlineProfile CardPM
+Quote Post

Ian2009

RE: Index.dat

20 Apr, 2009 - 09:11 AM
Post #5

New D.I.C Head
*

Joined: 7 Apr, 2009
Posts: 31



Thanked: 7 times
My Contributions
QUOTE(paul_so40 @ 20 Apr, 2009 - 08:25 AM) *

QUOTE(Ian2009 @ 20 Apr, 2009 - 07:25 AM) *

QUOTE(paul_so40 @ 20 Apr, 2009 - 06:27 AM) *

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 expression 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

CODE
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:
CODE

' 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.microsoft.com/en-us/library/sy...naryreader.aspx

Hope it helps and good luck.

This post has been edited by Ian2009: 20 Apr, 2009 - 09:13 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 03:02PM

Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month