Write multiple bytes

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I want write multiple bytes cause write byte by byte is very tired.
My actually code:Dim fb As New FolderBrowserDialog
fb.Description = "Select " & ComboBox1.Text & " installation directory"
fb.ShowNewFolderButton = True
If fb.ShowDialog = Windows.Forms.DialogResult.OK Then

Dim fs As New IO.FileStream(fb.SelectedPath & "test.exe", FileMode.Open, FileAccess.ReadWrite)
fs.Position = &H7EEB76
fs.WriteByte(&H0)

fs.Position = &H7EF3C6
fs.WriteByte(&H0)

fs.Position = &H7F0C7D
fs.WriteByte(&H0)
fs.Close()
fs.Dispose()

Dim fs1 As New IO.FileStream(fb.SelectedPath & "app.exe", FileMode.Open, FileAccess.ReadWrite)
fs1.Position = &H22D4D
fs1.WriteByte(&H0)

fs1.Position = &H2A2D6
fs1.WriteByte(&H0)

fs1.Position = &H2AB26
fs1.WriteByte(&H0)
fs1.Close()
fs1.Dispose()

Dim fs2 As New IO.FileStream(fb.SelectedPath & "ssf2.dll", FileMode.Open, FileAccess.ReadWrite)
fs2.Position = &H30626
fs2.WriteByte(&H0)

fs2.Position = &H30E76
fs2.WriteByte(&H0)

fs2.Position = &H3272D
fs2.WriteByte(&H0)
fs2.Close()
fs2.Dispose()

View the full article
 
Back
Top