title: Can't get processID using ctypes.windll.user32.GetWindowThreadProcessId
body: <p>I'm trying to get a proccessId using ctypes.windll.user32.GetWindowThreadProcessId, but the print does not match the PID seen in the task manager. Here is the code</p>
  
  <pre><code>import ctypes
  from ctypes import windll
  import time
  
  time.sleep(2)
  hwnd = windll.user32.GetForegroundWindow()
  pid = ctypes.c_ulong()
  GetWindowThreadProcessId =ctypes.windll.user32.GetWindowThreadProcessId(hwnd,pid)
  print GetWindowThreadProcessId
  </code></pre>