Saturday, September 27, 2014

Binary write to adress

When explaining why something doesn't work you will need to explain why it didn't. Was there any exception? Or how do you know that it didn't work as expected. You may want to try something like this:


private void button1_Click(object sender, EventArgs e)
{
byte[] bytes = new byte[str.Length * sizeof(char)];
System.Buffer.BlockCopy(textBox1.Text.ToCharArray(), 0, bytes, 0, bytes.Length);
using (FileStream fs = File.OpenWrite(listBox1.SelectedItem.ToString()))
{
fs.Seek(0x83C410, SeekOrigin.Begin);
fs.Write(bytes, 0, 7);
}
}





Sincerely, Jakeinc


No comments:

Post a Comment