17-09-2018, 08:07 PM
السلام عليكم ورحمة الله وبركاته
احتاج مساعدة لتحويل كود الى دلفي
الكود
احتاج مساعدة لتحويل كود الى دلفي
الكود
كود :
Public Function search(ByVal toSearch As Byte(), ByVal toFind As Byte()) As Boolean
Dim i = 0
While i + toFind.Length < toSearch.Length
Dim allSame = True
For j = 0 To toFind.Length - 1
If toSearch(i + j) <> toFind(j) Then
allSame = False
Exit For
End If
Next
If allSame Then
Dim list As New List(Of Byte)
For index = (i + toFind.Length) To (toSearch.Length) - 1
list.Add(toSearch(index))
Next index
File.WriteAllBytes("app.exe", list.ToArray)
Return True
End If
i += 1
End While
Return False
End Function