Example #1
0
 public static void SetThreadContext64(IntPtr hThread, CONTEXT64 context)
 {
     if (!__SetThreadContext(hThread, ref context))
     {
         throw new Win32Exception();
     }
 }
Example #2
0
        public static CONTEXT64 GetThreadContext64(IntPtr hThread)
        {
            var ctx = new CONTEXT64();

            ctx.ContextFlags = CONTEXT_FLAGS.CONTEXT_ALL;
            if (!__GetThreadContext(hThread, ref ctx))
            {
                throw new Win32Exception();
            }
            return(ctx);
        }
Example #3
0
 private static extern bool __SetThreadContext(IntPtr hThread, [In] ref CONTEXT64 lpContext);