/// <summary> /// Gets the main thread of a given process. /// </summary> /// <param name="hWindowHandle">The window handle of the process whose main thread will be returned.</param> /// <returns>Returns the main thread on success, null on failure.</returns> public static ProcessThread GetMainThread(IntPtr hWindowHandle) { if (hWindowHandle == IntPtr.Zero) { return(null); } return(GetMainThread(SProcess.GetProcessFromWindow(hWindowHandle))); }
public bool Open(IntPtr WindowHandle) { if (WindowHandle == IntPtr.Zero) { return(false); } return(this.Open(SProcess.GetProcessFromWindow(WindowHandle))); }
/// <summary> /// Gets the main thread ID of a given process. /// </summary> /// <param name="hWindowHandle">The window handle of the process whose main thread ID will be returned.</param> /// <returns>Returns non-zero on success, zero on failure.</returns> public static int GetMainThreadId(IntPtr hWindowHandle) { if (hWindowHandle == IntPtr.Zero) { return(0); } return(GetMainThreadId(SProcess.GetProcessFromWindow(hWindowHandle))); }
public NixLite(IntPtr WindowHandle) : this(SProcess.GetProcessFromWindow(WindowHandle)) { }