private void InitGame(int pid) { HackContext.GameContext = GameContext.OpenGame(pid, GameContextExceptionHandler); HackContext.InitSign(); //这个是获得最终信息的,必须最后执行 InitializeAddresses(); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); if (Dragging) { POINT p = new POINT(); GetCursorPos(out p); IntPtr wnd; wnd = WindowFromPoint(p.X, p.Y); GetWindowThreadProcessId(wnd, out var processID); Dragging = false; Refresh(); //获取游戏信息的操作最后执行,避免鼠标十字滞留 HackContext.GameContext = GameContext.OpenGame(processID); HackContext.InitSign(); //这个是获得最终信息的,必须最后执行 InitializeAddresses(); MainForm.MainFormInstance.OnInitialized(); } }