|
发表于 2010-1-12 06:28:48
|
显示全部楼层
安徽省阜阳市
这个东西是VB 的, 写的是使用findwindows+openprocess来实现的 ,,,
不懂加的QQ我告诉你。我的Q:136751884
广告一下, 师傅我的帐号找回来了,鲁凯啸 我是你徒弟太子。, 鲁凯啸 UP↑ UP↑
Private Declare Function OpenProcess Lib "kernel32" (ByVal _
dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
这个是AIP的函数,,
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal _
hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal _
dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal _
hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal _
hProcess As Long, ByVal 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 = &H1F0FFF
Dim hh As Long
Dim pp As Long
Dim pp2 As Long
Private Sub Command1_Click()
dim str as string
str="red alert 2" '此为游戏窗体名称,视游戏的不同而改变
hh = FindWindow(vbNullString, str)
If hh <> 0 Then
GetWindowThreadProcessId hh, pp
pp2 = OpenProcess(PROCESS_ALL_ACCESS, False, pp)
If pp2 <> 0 Then
WriteProcessMemory pp2, &H4E4B89, &H90, 1, 0 '如果为ADD指令则为WriteProcessMemory pp2, &H4E4B89, &H03, 1, 0
WriteProcessMemory pp2, &H4E4B8A, &H90, 1, 0 '如果为ADD指令则为WriteProcessMemory pp2, &H4E4B8A, &H27, 1, 0
CloseHandle (pp2)
Else
MsgBox "打开进程失败", , "红警修改器"
End If
Else
MsgBox "请先运行红色警戒2", , "红警修改器"
End If
End Sub |
|