代码是VB写的.
[Visual Basic] 纯文本查看 复制代码 Sub WriteSet_2()
Dim 窗口句柄 As Long
Dim 标识符 As Long
Dim 进程句柄 As Long
Dim Ret As Long, BaseAddress As Long, x As Long
窗口句柄 = FindWindow(vbNullString, "EliteSpy+ 枕善居收集整理")
GetWindowThreadProcessId 窗口句柄, 标识符 '
进程句柄 = OpenProcess(&H1F0FFF, False, 标识符) '
If (进程句柄 = 0) Then Exit Sub
BaseAddress = Val("&H" & "0026DA90") '目标指针
'//数据类型:Byte数组
Dim s As String, b() As Byte
s = "T5ABS" & vbNull
b = StrConv(s, vbFromUnicode) & vbNull
'// 写入内存数据
Ret = WriteProcessMemory(进程句柄, ByVal BaseAddress, b(0), UBound(b) + 1, 0&)
x = CloseHandle(进程句柄)
End Sub
|