XeMen Demon
The Original Shiba Inu
I was wondering how do I make a program that when I press a button it will write whatever I tell it to a certain offset in a file.
int address = 0x8200;
int addressBeingOffset = address + 0xEE; //0xEE is the offset...
Public Sub Write(ByVal address As Long, ByVal fileName As String, ByVal data() As Byte)
Dim writer As New IO.BinaryWriter(New IO.FileStream(fileName, IO.FileMode.Open, IO.FileAccess.Write))
writer.BaseStream.Position = address
writer.Write(data)
End Sub
That's like saying "stop calling it a big african cat, it's a lion!" Herpaderp.Stop calling it a ****ing offset, its an address...
Dim fs As System.IO.FileStream
Dim bw As System.IO.BinaryWriter
fs = New System.IO.FileStream(OFD1.FileName, IO.FileMode.OpenOrCreate) 'Uses the file you just opened
bw = New System.IO.BinaryWriter(fs) 'tells the binary writer to write to the file you opened
fs.Position = &H '&H is the hex code position
bw.Write() 'put the value in parenthesis that you want it to write