[零基礎][02] vb6寫楓之谷外掛 – 開啟進程並取得篇

為了能夠自如的在遊戲中調用CEAutoASM、讀取及寫入Pointer,常看到許多免費外掛在遊戲開啟至Play處時要求使用者按下鎖定或連結遊戲。其實這個動作就是要取得遊戲的進程,以下使用的函數從Hack.cls中調用,閱讀本篇文章前,請確認您已經閱讀過[零基礎][01] vb6寫楓之谷外掛 – Hack.cls 類模組篇


HACK.Pid = 0: HACK.Handle = 0: HACK.hWnd = 0: HACK.Inited = False

If HACK.OpenProcessByWindow(vbNullString, "MapleStoryClass") Then
Me.Caption = "MSHack - " & HACK.Pid
Call HACK.WritePointer("MP警告基址", "MP警告位移 - 4", &H20): Call HACK.WritePointer("MP警告基址","MP警告位移", &H20)'下一篇文章會解釋

ElseIf HACK.OpenProcessByWindow("MapleStory", "StartUpDlgClass") Then
Me.Caption = "MSHack - " & HACK.Pid
Call HACK.WritePointer("MP警告基址", "MP警告位移 - 4", &H20): Call HACK.WritePointer("MP警告基址","MP警告位移", &H20)
Else
Me.Caption = "MSHack"
MsgBox("未能找到遊戲。", vbCritical, "Oops")
End If