i have made app that opens file with OpenFileDialog and writes a value into file. But it deletes all hex values in file.
BinaryWriter bw = new BinaryWriter bw = new BinaryWriter(File.OpenWrite(ofd.FileName));
Byte[] Bytes = { 0x46, 0x46, 0x44 };
bw.BaseStream.Position = (0x0106E);
bw.Write(Bytes);
bw.Flush();
bw.Close
Everything is deleted from file and only 464644 are in their possition and that ends file.
What i am doing wrong and how to do this right?
Thanks in advance.
This post has been edited by tlhIn`toq: 25 August 2012 - 03:48 PM
Reason for edit:: [code] your code here [/code] tags added

New Topic/Question
Reply



MultiQuote




|