Example #1
0
 /// <summary>
 /// Retrieves the context of the specified thread.
 /// </summary>
 /// <param name="handle"></param>
 public static ThreadContext GetThreadContext(IntPtr handle)
 {
     ThreadContext context = new ThreadContext { ThreadContextFlags = ThreadContextFlags.All };
     if (!UnmanagedGetThreadContext(handle, ref context))
     {
         throw new Win32Exception();
     }
     return context;
 }
Example #2
0
 private static extern bool UnmanagedGetThreadContext(IntPtr hThread, ref ThreadContext lpThreadContext);