Dim hwd As Long
Dim pid As Long
Dim hProcess As Long
hwd = FindWindow(vbNullString, "植物大战僵尸中文版")
GetWindowThreadProcessId hwd, pid
hProcess = OpenProcess(&H1F0FFF, False, pid)
If hProcess Then
Dim fuck(3) As Byte
fuck(0) = &H83
fuck(1) = &H46
fuck(2) = &H58
fuck(3) = &HFC
WriteProcessMemory hProcess, ByVal &H45F8A9, fuck(0), 4, 0
End If
Private Sub Command2_Click()
Dim hwd As Long
Dim pid As Long
Dim hProcess As Long
hwd = FindWindow(vbNullString, "植物大战僵尸中文版")
GetWindowThreadProcessId hwd, pid
hProcess = OpenProcess(&H1F0FFF, False, pid)
If hProcess Then
Dim fuck(3) As Byte
fuck(0) = &H83
fuck(1) = &H46
fuck(2) = &H58
fuck(3) = &HFF
WriteProcessMemory hProcess, ByVal &H45F8A9, fuck(0), 4, 0
End If
a.修改内存1字节短整数 "PlantsVsZombies.exe", "45F8AC", 252
a.修改内存1字节短整数 "PlantsVsZombies.exe", "45F8AC", 255