vb6 GetWindowThreadProcessId問題

2011-10-31 7:09 am
製作程式時彈出編釋錯誤發現不確定的名稱:GetWindowThreadProcessId 問題 , 揾人幫幫手

Code:

Private Sub Check2_Click()Dim lnghWnd As Long
Dim lngHandle As Long
Dim lngProcessID As Long
Dim lpBuffer As Long
Dim pdpd = "Tales Runner"
lnghWnd = FindWindow(pd, vbNullString)
If lnghWnd <> 0 Then
GetWindowThreadProcessId lnghWnd, lngProcessID
lngHandle = OpenProcess(PROCESS_ALL_ACCESS, False, lngProcessID)
Call ReadProcessMemory(lngHandle, lpBaseAddress, lpBuffer, 1, 0&)Open "C:log.txt" For Append As #2
Print #1, " " & lpBaseAddress & "00CE5104 "
Print #2, " " & lpBuffer & "1250000000 "
Close #1
Close #2CloseHandle lngHandle
End If
End If
End SubEnd Sub

回答 (2)

2011-11-01 10:39 pm
✔ 最佳答案
"GetWindowThreadProcessId" will return a Value, So, you must use a variable to accept the return value.

Dim a as long

a = GetWindowThreadProcessId(lnghWnd, lngProcessID)

2011-11-07 7:46 am
不確定的名稱 <~ 你個Declare Function 呢???


收錄日期: 2021-04-20 11:44:19
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20111030000051KK01190

檢視 Wayback Machine 備份