感谢您帮我看程序...谢谢您^^
我有找过"用VB制作带搜索功能的游戏修改器"教学文章
经测试后..结果也是错的
本篇如果可以测试通过.正好也可以让有心想学好vb的人
多了一篇实用文章...
可以再看看后面的问题吗..QQ
经测试后.hwnd没问题...加上一句判断式就可以了
hwnd = FindWindow(vbNullString, Text1.Text) ' 完美世界窗口名"Element Client"
If Text1.Text = "" Then hwnd = 0
If hwnd = 0 Then
MsgBox "找不到窗口"
Exit Sub
End If
感觉是以下这段搜索条件出问题了
我不知要如何用Long去比对4个Byte
(byte只要比对一个Byte,Integer和Long分别要比对2和4个Byte..)
Dim data() As Long, i As Long, j As Long, k As Long
Dim finded As Long, fio As Long
fio = CLng(Text2.Text)
For i = 0 To PageNum - 1
ReDim data(1 To PageSize(i))
ReadProcessMemory hProcess, ByVal BassAddr(i), data(1), PageSize(i), ByVal 0&
For j = 1 To PageSize(i)
If data(j) = fio Then
'List1.AddItem BassAddr(i) + j - 1 '10进制
List1.AddItem Right("00000000" & Hex(BassAddr(i) + j - 1), 8) '16进制
DoEvents
finded = finded + 1
End If
Next
Next
Next
原本的程序是比对Byte
(开启一wordpad,再用本程序与gm8所搜索出的值是一样的)
Dim data() As Byte, i As Long, j As Long, k As Long
Dim finded As Long, fio As Byte
fio = CByte(Text2.Text)
For i = 0 To PageNum - 1
ReDim data(1 To PageSize(i))
ReadProcessMemory hProcess, ByVal BassAddr(i), data(1), PageSize(i), ByVal 0&
For j = 1 To PageSize(i)
If data(j) = fio Then
'List1.AddItem BassAddr(i) + j - 1 '10进制
List1.AddItem Right("00000000" & Hex(BassAddr(i) + j - 1), 8) '16进制
DoEvents
finded = finded + 1
End If
Next
Next
Next
[ 本帖最后由 tao1224 于 2006-12-24 09:44 编辑 ]