title: WinAPI C++ how to load resources from 64-bit application
body: <p>I want to load out resources from an EXE. For example I want to load version info <code>RT_VERSION</code>, from EXE <code>path</code></p>
  
  <p>Normally I would do this way</p>
  
  <pre class="lang-cpp prettyprint-override"><code>HMODULE lib = LoadLibrary(path);
  
  HRSRC resVersion = FindResource(lib, MAKEINTRESOURCE(1), RT_VERSION);
  DWORD resVersionSize = SizeofResource(lib, resVersion);
  HGLOBAL resVersionLoad = LoadResource(lib, resVersion);
  LPVOID resVersionData = LockResource(lib);
  </code></pre>
  
  <p>But when the exe of <code>path</code> is a win-64 application, <code>LoadLibrary</code> fails with <code>ERROR_BAD_EXE_FORMAT : %1 is not a valid Win32 application.</code> Is there anyway to load resources from win-64 application?</p>