title: C# - user32.dll - GetWindowRect problem
body: <pre><code>[DllImport("user32.dll")]
  [return: MarshalAs(UnmanagedType.Bool)]
  static extern bool GetWindowRect(HandleRef hWnd, out RECT lpRect);
  
  [StructLayout(LayoutKind.Sequential)]
  public struct RECT
  {
      public int Left;        // x position of upper-left corner
      public int Top;         // y position of upper-left corner
      public int Right;       // x position of lower-right corner
      public int Bottom;      // y position of lower-right corner
  }
  
  foreach (Process pr in Process.GetProcesses())
  {
      RECT rc;
      GetWindowRect(???, out rc);
  </code></pre>
  
  <p>What should I put for " ??? " ? . It tells me I have to put a HandleRef object but I do not know how to get HandleRef object from Process method.</p>