Originally Posted by
fiqhpratama
Help me.
im Noob
how to write/Read string value on delphi using WriteProcessMemory
im using Edit1.Text for writing value:
please some help me.
i hate it there is no Delphi Section!
The Windows API return LPRSTR which is a PChar in Delphi.
A String in Delphi saves the Memory Position of the CharArray in Slot 0 of the Array, so the char array is beginning is at 1
Code:
var
PlayerNameSlot1: string;
begin
SetLength(PlayerNameSlot1, 32);
ReadProcessMemory(GameHandle, Pointer(GTA5.exe + $268A9F4 + $88), @playernameSlot1[1], sizeof(PlayerNameSlot1), FByteBuffer);
end;
Code:
begin
WriteProcessMemory(GameHandle, Pointer(Address), @edIT1.Text[1], sizeof(Edit1.Text), FByteBuffer);
end;