代码是: Option Explicit Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Dim h, ID, p 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 Const PROCESS_ALL_ACCESS As Long = &H1F0FFF Private Sub Form_Click() Cls h = FindWindow(vbNullString, "ħÊÞÕù°Ô") Print h Call GetWindowThreadProcessId(h, ID) Print ID p = OpenProcess(PROCESS_ALL_ACCESS, False, ID) Print pEnd Sub
取其他正常 取魔兽 就只能取到 ID 在用ID取 进程句柄 就是0了
h = FindWindow(vbNullString, "ħÊÞÕù°Ô") 窗口都没找到,怎么打开进程?
Option Explicit
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim h, ID, p
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 Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
Private Sub Form_Click()
Cls
h = FindWindow(vbNullString, "ħÊÞÕù°Ô")
Print h
Call GetWindowThreadProcessId(h, ID)
Print ID
p = OpenProcess(PROCESS_ALL_ACCESS, False, ID)
Print pEnd Sub
窗口都没找到,怎么打开进程?
就象他们家的WOW,到现在6,7年了还没有一个离线外挂出现,已经很说明问题了.