/// <summary> /// Opens a thread for manipulation. AccessRights.THREAD_ALL_ACCESS is automatically granted. /// </summary> /// <param name="dwThreadId">The ID of the thread in question.</param> /// <returns>Returns a handle to the thread allowing manipulation.</returns> public static IntPtr OpenThread(int dwThreadId) { return(Imports.OpenThread(AccessRights.THREAD_ALL_ACCESS, false, (uint)dwThreadId)); }
/// <summary> /// Opens a thread for manipulation. /// </summary> /// <param name="dwDesiredAccess">The desired access rights to the thread in question.</param> /// <param name="dwThreadId">The ID of the thread in question.</param> /// <returns>Returns a handle to the thread allowing manipulation.</returns> public static IntPtr OpenThread(uint dwDesiredAccess, int dwThreadId) { return(Imports.OpenThread(dwDesiredAccess, false, (uint)dwThreadId)); }