Array Of Bytes

TheRedEye

New member
Array Of Bytes

אני מעוניין לכתוב לזיכרון ערך מסוג Array Of Bytes. אני מנסה לשנות פונקציה שכתבתי לLONG שעובדת טוב
Public Function WriteALong(gamewindowtext As String, address As Long, value As Long) Dim hwnd As Long Dim pid As Long Dim phandle As Long Dim ch1 As Long Call Check("WarRock", ch1) If ch1 = 1 Then hwnd = FindWindow(vbNullString, gamewindowtext) If (hwnd = 0) Then MsgBox "WarRock Is Not Working", vbCritical, "Error" End Exit Function End If GetWindowThreadProcessId hwnd, pid phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid) If (phandle = 0) Then MsgBox "Can't get ProcessId", vbCritical, "Error" Exit Function End If WriteProcessMemory phandle, address, value, 4, 0& CloseHandle hProcess Else End If End Function​
ניסיתי לכתוב בArray Of Bytes ובעוד כמה שטויות ושום דבר לא עובד.. אני מנסה לכתוב את E9 38 4A 4E 00 לכתובת בזיכרון האם זה אפשרי?
 

פאשה0

New member
אתה רוצה לכתוב 5 איברים ממערך ה-byte

לכתובת ספציפית? אם הבנתי נכון, אז צריך לרשום קריאה ל-WriteProcessMemory ככה:
WriteProcessMemory phandle, address, value(0), 5, 0&​
כאשר value הפעם צריך להיות מערך byte בגודל לפחות 5 וצריך להכיל את הערכים שאתה מעוניין לכתוב לזיכרון.
 
למעלה