title: C++ FindProcessWindow in dll
body: <p>Simple thing, find top-level window by class name that belongs to parent process of dll. From what I found on the internet I should </p>
  
  <ol>
  <li><code>EnumWindows</code> enumerate all top-level windows</li>
  <li>in <code>EnumWindowsProc</code> compare class name <code>GetClassName</code> of enumerated window with desided name </li>
  <li>If it is equal check <code>GetWindowThreadProcessId</code> is same as dlls parent pid</li>
  </ol>
  
  <p>But I came across an obstacle, how to obtain PID of dll loader? Or maybe there is another way to find parent window by class name?</p>