📄 module2.bas
字号:
Attribute VB_Name = "Module2"
Option Explicit
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Function EnumWindowsProc(ByVal hWnd As Long, ByVal lParam As Long) As Boolean
Dim S As String
S = String(80, 0)
Call GetWindowText(hWnd, S, 80)
S = Left(S, InStr(S, Chr(0)) - 1)
Dim best As Long
If Len(S) > 0 And UCase(S) = UCase("Element Client") Then
Dim ProcID As Long, hpID As Long, BuffEnum(35) As Byte, ECXI As Long, eax As Long, Str As String, Mane As Long
GetWindowThreadProcessId hWnd, hpID
ProcID = OpenProcess(PROCESS_ALL_ACCESS, False, hpID)
ReadProcessMemory ProcID, ByVal &H963164, ECXI, 4, 0 '这个是存放基址的地址"诛仙:991B94"
ReadProcessMemory ProcID, ByVal ECXI + &H20, eax, 4, 0
ReadProcessMemory ProcID, ByVal eax + &H5F0, Mane, 4, 0
ReadProcessMemory ProcID, ByVal Mane, BuffEnum(0), 36, 0
Str = Left$(BuffEnum, 36)
Form1.Combo1.Text = Str
'best = Val("&H27B37A0")
'ReadProcessMemory ProcID, ByVal best, ByVal VarPtr(BuffEnum(0)), 24, 0
'Str = Left$(BuffEnum, 24)
'物品名称 = 去空格(Trim$(物品名称)
End If
CloseHandle ProcID
EnumWindowsProc = True
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -