How do you overwrite bytes in a certain position in a file
-
Hi How do you overwrite bytes in a certain position in a file in VB.Net/VS2003.
-
Hi How do you overwrite bytes in a certain position in a file in VB.Net/VS2003.
This is covered by the FileStream[^] class. You usually open the file, Seek to the position you want to overwrite, then Write the new data.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Hi How do you overwrite bytes in a certain position in a file in VB.Net/VS2003.
What type of file is this? If it is text, you dont have a choice but to read out the whole file, change the characters that you want to, and write it all out again.
-
What type of file is this? If it is text, you dont have a choice but to read out the whole file, change the characters that you want to, and write it all out again.
Hi It is a midi file... The header is mixed as follows: A 4-byte chunk type (ascii) A 4-byte length (32 bits, msb first) length bytes of data (I will only be able to check if you reply in the morning)
-
Hi It is a midi file... The header is mixed as follows: A 4-byte chunk type (ascii) A 4-byte length (32 bits, msb first) length bytes of data (I will only be able to check if you reply in the morning)
RichardBerry wrote:
It is a midi file... The header is mixed as follows: A 4-byte chunk type (ascii) A 4-byte length (32 bits, msb first) length bytes of data
In that case, please look at Dave's suggestion above. Keep in mind that the number of bytes you want to write should match the number you are overwriting, though :)