Cairo.WindowsHooksWrapper.NativeMethods.GetProcess C# (CSharp) Метод

GetProcess() публичный статический Метод

Retrieves a running process.
public static GetProcess ( IntPtr hwnd ) : Process
hwnd System.IntPtr
Результат System.Diagnostics.Process
        public static Process GetProcess(IntPtr hwnd)
        {
            try
            {
                uint pid = 0;
                GetWindowThreadProcessId (hwnd, out pid);
                return Process.GetProcessById ((int)pid); //Gets the process by ID.
            }
            catch (Exception)
            {
                return null;
            }
        }