title: Using Module32First/Next to Enumerate 32bit Process Modules from 64bit Process
body: <p>Here's the code:</p>
  
  <pre><code> hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE32, dwPID ); 
    if( hModuleSnap == INVALID_HANDLE_VALUE ) 
    { 
  
      return( r_mi ); 
    } 
  
  
    me32.dwSize = sizeof( MODULEENTRY32 ); 
  
    if( !Module32First( hModuleSnap, &amp;me32 ) ) 
    { 
  
      CloseHandle( hModuleSnap );
      return( r_mi ); 
    } 
  
    do 
    { 
        MessageBoxA(0,me32.szModule,0,0);
  
    } while( Module32Next( hModuleSnap, &amp;me32 ) );
  </code></pre>
  
  <p>Problem is that when trying to enumerate the modules of a 32bit process from a 64bit process, only the x64 modules are being listed.</p>
  
  <p>From MSDN for TH32CS_SNAPMODULE32:
  Includes all 32-bit modules of the process specified in th32ProcessID in the snapshot when called from a 64-bit process.</p>
  
  <p>But still, it's only listing the x64 modules</p>
  
  <p>Anyone know a work around for this?</p>