Binarysharp.MemoryManagement.Windows.WindowCore.GetWindowThreadId C# (CSharp) Method

GetWindowThreadId() public static method

Retrieves the identifier of the thread that created the specified window.
public static GetWindowThreadId ( IntPtr windowHandle ) : int
windowHandle System.IntPtr A handle to the window.
return int
        public static int GetWindowThreadId(IntPtr windowHandle)
        {
            // Check if the handle is valid
            HandleManipulator.ValidateAsArgument(windowHandle, "windowHandle");

            // Get the thread id
            int trash;
            return NativeMethods.GetWindowThreadProcessId(windowHandle, out trash);
        }