偵測遊戲進程~
本帖最後由 qwe11914 於 2017-9-29 19:19 編輯小弟拿龍大開源的MS專案想要改成使用爆爆王的專案
以下是龍大偵測程式碼部分:
Private Sub tsiGameLock_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsiGameLock.Click
OpenProcessByWindow_LA("MapleStory", "StartUpDlgClass")
End Sub
Private Sub tmDetect_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmDetect.Tick
If FindWindow("MapleStoryClass", "MapleStory") <> 0 Then
MShWnd = FindWindow("MapleStoryClass", "MapleStory")
tmDetect.Enabled = False
End If
End Sub
Public Sub OpenProcessByWindow_LA(ByVal lpWindowName As String, Optional ByVal lpClassName As String = vbNullString)
MShWnd = FindWindow(lpClassName, lpWindowName)
GetWindowThreadProcessId(MShWnd, MSpid)
MShprocess = OpenProcessAPI(&H1F0FFF, False, MSpid)
If MSpid <> 0 Then
CEInitialize(MSpid, MShprocess)
If lpClassName = "StartUpDlgClass" Then
tmDetect.Enabled = True
tmDetect.Enabled = 1000
CloseGame_LA()
End If
Form1.Text = "~偵測成功~" & MSpId
Else
MsgBox("~偵測失敗~")
End If
End Sub
請問紅色部分要如何修改 才能成功讀取進程
小弟目前是把這行 OpenProcessByWindow_LA("MapleStory", "StartUpDlgClass")
改成OpenProcessByWindow_LA("爆爆王")
就能讀取視窗名稱 但在遊戲裡開啟功能沒有反應!
所以想請教各位大大們~
願意幫小弟的請留言或+RC:qwe31914
感激不盡~
P.S 感謝龍大的開源專案~
建議整個重改 要用的API 留著就好 感謝分享 領個幣 有封閉耶 有點複雜呢~:lol:lol 路過拿封閉喔 幫推等內行的解答
領楓幣~~ OpenProcessByWindow_LA("爆爆王","StartUpDlgClass")
試試 雖然看不懂 但還是幫推個~ 路過嶺楓幣:D 你應該不可能只改那一段吧 ...
MapleStory = 新楓之谷 將MapleStory 都改成:爆爆王
另))雖然我不懂 但看見深澳文 我還是給個推
已加您RC了 懇請接受好友 傳授小弟一些技術 !!
頁:
[1]
2