title: CreateToolhelp32Snapshot fails when enumerating a 32bit process from a 32 bit process
body: <p>I am writing a basic debugger in c++.  I am trying to get a list of the loaded modules of the debugged process from the debugger process.  My OS is 64bit windows 7, but both the debugger and the debuggee are compiled 32 bit (when looked at in task manager, they have *32 next to their names).  </p>
  
  <p>Whenever I try to call CreateToolhelpSnapshot on the debuggee from the debugger, I get a 299 error.  MSDN says that this should only happen if querying a 64 bit process from a 32 bit on or vice versa.  Both of my processes are 32 bit as far as I can tell.</p>
  
  <p>Here is my snapshot code:</p>
  
  <pre><code>HANDLE hModuleSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE32, pid);
  if( hModuleSnap == INVALID_HANDLE_VALUE )
  {
      std::cout &lt;&lt; "CreateToolhelp32Snapshot Error: " &lt;&lt; GetLastError() &lt;&lt; std::endl;
  }
  </code></pre>