17-05-14, 10:01 PM
تفضل أخي
كود :
Dim MyFileStream As IO.FileStream = Nothing
Try
MyFileStream = New IO.FileStream("D:\test.exe", IO.FileMode.Open, IO.FileAccess.Write)
'صف من البايت مكون من 16 خانة
Dim Buffer As Byte() = {&H4, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H4, &H0, &H0, &H0, &H0, &H0, &H0, &H0}
' عنوان الصف وهو C0
MyFileStream.Seek(&HC0, IO.SeekOrigin.Begin)
'كتابة الصف الجديد بدل القديم
MyFileStream.Write(Buffer, 0, Buffer.Length)
Finally
If MyFileStream IsNot Nothing Then MyFileStream.Close()
End Try