PDA

View Full Version : How to read file?


trinopoty
Mar 11, 2009, 07:43 AM
I need to read a file that contains two files in it. Its sort of like an ISO file. I need to extract the files. Please help me with the full code. I have a Open file dialog box: dlgopen. And a button to show the open file dialog: cmdOpen. Its Visual Basic 2008.

Perito
Mar 11, 2009, 06:18 PM
I'd need more information than that. If it's "sort of like an ISO file", then you'd need to know the *exact* binary format of the file in order to extract the files. You'll need to know exactly how they're stored. Is there some sort of header indicating where the files are. Are they compressed? Are they just a stream of bytes of the original file? How do you know how many bytes to read and write?

In VB.NET, you'll probably need a BinaryReader and a BinaryWriter objects.

trinopoty
Mar 12, 2009, 07:46 PM
I'd need more information than that. If it's "sort of like an ISO file", then you'd need to know the *exact* binary format of the file in order to extract the files. You'll need to know exactly how they're stored. Is there some sort of header indicating where the files are. Are they compressed? Are they just a stream of bytes of the original file? How do you know how many bytes to read and write?

In VB.NET, you'll probably need a BinaryReader and a BinaryWriter objects.
I will also compress the file using VB (VB 2008). And they are not compressed. Uncompressed like an ISO File.