vb OpenProcess的使用
hwd=FindWindow(vbNullString,"地下城与勇士")pid=GetWindowThreadProcessId(hwd,lpdwProcessId)'...
hwd = FindWindow(vbNullString, "地下城与勇士")
pid = GetWindowThreadProcessId(hwd, lpdwProcessId)
'hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid)
hProcess = OpenProcess(PROCESS_ALL_ACCESS, 1, pid)
If hProcess Then
ReadProcessMemory hProcess, ByVal &H12F82C, base, 4, 0&
End If
'retValue = SetWindowPos(Me.hwnd, hwd, 750, 20, 265, 400, SWP_SHOWWINDOW)'该函数改变一个子窗口,弹出式窗口式顶层窗口的尺寸,位置和Z序
Text1.Text = hwd
Text2.Text = hProcess
Text4.Text = pid
我用这条代码就是hProcess失败,到底要怎样弄才可以成功呢,会的告诉我下 展开
pid = GetWindowThreadProcessId(hwd, lpdwProcessId)
'hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid)
hProcess = OpenProcess(PROCESS_ALL_ACCESS, 1, pid)
If hProcess Then
ReadProcessMemory hProcess, ByVal &H12F82C, base, 4, 0&
End If
'retValue = SetWindowPos(Me.hwnd, hwd, 750, 20, 265, 400, SWP_SHOWWINDOW)'该函数改变一个子窗口,弹出式窗口式顶层窗口的尺寸,位置和Z序
Text1.Text = hwd
Text2.Text = hProcess
Text4.Text = pid
我用这条代码就是hProcess失败,到底要怎样弄才可以成功呢,会的告诉我下 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询