Exemple #1
0
        public static void SuspendMainWowThread()
        {
            ProcessThread wowMainThread = SThread.GetMainThread((int)MyHook._processId);
            IntPtr        hThread       = SThread.OpenThread(wowMainThread.Id);

            SThread.SuspendThread(hThread);
        }
Exemple #2
0
        public static void ResumeMainWowThread()
        {
            ProcessThread wowMainThread = SThread.GetMainThread(process.Id);
            IntPtr        hThread       = SThread.OpenThread(wowMainThread.Id);

            SThread.ResumeThread(hThread);
        }
Exemple #3
0
        public static void resumeMainThread(int dwProcessId)
        {
            ProcessId = dwProcessId;
            ProcessThread wowMainThread = SThread.GetMainThread(ProcessId);
            IntPtr        hThread       = SThread.OpenThread(wowMainThread.Id);

            SThread.ResumeThread(hThread);
        }
Exemple #4
0
        public static void suspendMainThread(int dwProcessId)
        {
            ProcessId = dwProcessId;
            ProcessThread wowMainThread = SThread.GetMainThread(ProcessId);
            IntPtr        hThread       = SThread.OpenThread(wowMainThread.Id);

            SThread.SuspendThread(hThread);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
        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);
            }
        }
Exemple #7
0
 /// <summary>
 /// Resumes WoW's main thread
 /// </summary>
 private static void ResumeMainthread()
 => SThread.ResumeThread(
     SThread.OpenThread(
         SThread.GetMainThread(BlackMagic.ProcessId).Id));
Exemple #8
0
 /// <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));