public static void SetThreadContext64(IntPtr hThread, CONTEXT64 context) { if (!__SetThreadContext(hThread, ref context)) { throw new Win32Exception(); } }
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); }
private static extern bool __SetThreadContext(IntPtr hThread, [In] ref CONTEXT64 lpContext);