Arkadaslar Cheat Engine de kodları buluyorum ama ben bunu bi program haline getirmek istiyorum nasıl yapabilirim ?
Follow along with the video below to see how to install our site as a web app on your home screen.
Not: This feature may not be available in some browsers.
'İlk olarak WinAPI tanımlamalarımız
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" Alias "GetWindowThreadProcessId" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
'Forma bir TextBox(Text1) bir CommandButton(Command1) ekliyoruz.Ve kodlar..
Private Sub Command1_Click()
On Error Resume Next 'Hata oluşursa görmezden gel devam et
Dim hWnd As Long, pID As Long, hProcess As Long, adres As Long, buffer As Long 'Değişken tanımlamaları Long olarak tanımlıyoruz çünkü integerin sınırı olan 32767 den büyük değerler var
adres = &H1005194 'Buraya Cheat Enginede bulduğunuz adresi başına '&H" koyarak yazın,&H hexi(16 lık sayı sistemini) ifade ediyor
buffer = CLng(Text1.Text) 'Text1 de yazanı sayıya çeviriyoruz
hWnd = FindWindow(vbNullString, "Mayın Tarlası") 'Pencere handlesi alınıyor
GetWindowThreadProcessId hWnd, pID 'Process Id aliyoruz
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, pID) 'Processi tam yetkiyle açıyoruz
If (WriteProcessMemory(hProcess, ByVal adres, buffer, 4, 0&)) = 1 Then 'Eğer hafızaya yazılmışsa 1 değeri döner
MsgBox "İşlem başarıyla tamamlandı", vbInformation
Else
MsgBox "Bir hata oluştu", vbCritical
End If
CloseHandle (hProcess) 'OpenProcess ile açtığımız handleyi kapatıyoruz..
End Sub