public static OpenThread ( ThreadAccessFlags accessFlags, int threadId ) : |
||
accessFlags | ThreadAccessFlags | The access to the thread object. |
threadId | int | The identifier of the thread to be opened. |
return |
/// <summary> /// Initializes a new instance of the <see cref="RemoteThread" /> class. /// </summary> /// <param name="memorySharp">The reference of the <see cref="MemoryManagement.MemorySharp" /> object.</param> /// <param name="thread">The native <see cref="ProcessThread" /> object.</param> internal RemoteThread(MemoryBase memorySharp, ProcessThread thread) { // Save the parameters MemorySharp = memorySharp; Native = thread; // Save the thread id Id = thread.Id; // Open the thread Handle = ThreadCore.OpenThread(ThreadAccessFlags.AllAccess, Id); // Initialize the TEB Teb = new ManagedTeb(MemorySharp, ManagedTeb.FindTeb(Handle)); }