public static void SuspendMainWowThread() { ProcessThread wowMainThread = SThread.GetMainThread((int)MyHook._processId); IntPtr hThread = SThread.OpenThread(wowMainThread.Id); SThread.SuspendThread(hThread); }
public static void ResumeMainWowThread() { ProcessThread wowMainThread = SThread.GetMainThread(process.Id); IntPtr hThread = SThread.OpenThread(wowMainThread.Id); SThread.ResumeThread(hThread); }
public static void resumeMainThread(int dwProcessId) { ProcessId = dwProcessId; ProcessThread wowMainThread = SThread.GetMainThread(ProcessId); IntPtr hThread = SThread.OpenThread(wowMainThread.Id); SThread.ResumeThread(hThread); }
public static void suspendMainThread(int dwProcessId) { ProcessId = dwProcessId; ProcessThread wowMainThread = SThread.GetMainThread(ProcessId); IntPtr hThread = SThread.OpenThread(wowMainThread.Id); SThread.SuspendThread(hThread); }
public static void ResumeMainWowThread() { if (MyHook == null) { MyHook = new Hook((uint)ObjectManager.WowProcess.Id, (uint)ObjectManager.WowProcess.MainModule.BaseAddress); } ProcessThread wowMainThread = SThread.GetMainThread((int)MyHook._processId); IntPtr hThread = SThread.OpenThread(wowMainThread.Id); SThread.ResumeThread(hThread); }
protected override void WndProc(ref Message m) { base.WndProc(ref m); if (m.Msg == 0xBEEF) { Console.WriteLine("0xBEEF message recieved, resuming main thread!"); ProcessThread wowMainThread = SThread.GetMainThread(ProcessId); IntPtr hThread = SThread.OpenThread(wowMainThread.Id); SThread.ResumeThread(hThread); } }
/// <summary> /// Resumes WoW's main thread /// </summary> private static void ResumeMainthread() => SThread.ResumeThread( SThread.OpenThread( SThread.GetMainThread(BlackMagic.ProcessId).Id));
/// <summary> /// Hold WoW's main thread, be careful things get dangerous here /// </summary> private static void PauseMainThread() => SThread.SuspendThread( SThread.OpenThread( SThread.GetMainThread(BlackMagic.ProcessId).Id));