Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15655

[help] VB6, How to search/replace a pattern in the byte array?

$
0
0
Used the code below to read a binary file into byte array.

Code:

Private Sub cmdTest_Click()
    Dim fileNum As Integer
    Dim bytes() As Byte

    fileNum = FreeFile
    Open "C:\users\xxxx\desktop\wp.bin" For Binary As fileNum
    ReDim bytes(LOF(fileNum) - 1)
    Get fileNum, , bytes
    Close fileNum
End Sub

How can I search/replace a pattern in bytes() ?

Viewing all articles
Browse latest Browse all 15655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>