|
-
July 11th, 2010, 11:55 AM
#1
VB6 How to Read text/String Using binary method ?
Private Sub Form_Load()
Dim q As String, txtFileLen As Long, bytes() As Byte
i = FreeFile
Open "c:\a.exe" For Binary As i
txtFileLen = LOF(i)
ReDim bytes(1 To txtFileLen)
Get #i, , bytes
Close i
text1.text = bytes ' Here how to show binary to text field
Open "c:\b.exe" For Binary As i
Put #i, , bytes
Close i
End Sub
actually i want to add a string before the bytes something like this
bytes = "Fixed !" & bytes
can i add string to bytes(0) at zero position, is there any way to open an .exe file and add some string before it. which prevent exe from running and when i try to open just remove string before exe file and write whole new exe starting before my string..... any idea !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|