title: Bitmap::FromFile method returns NULL on x86
body: <p>I've this piece of code working on Windows 7 64-bit: it allows me to transform a representation of an <code>Image</code> contained into a <code>std::string</code> (<code>Base64EncodedImage</code>) to a <code>GdiPlus::Bitmap</code>:</p>
  
  <pre><code>HRESULT hr; 
  using namespace Gdiplus;
  std::string decodedImage = Base64EncodedImage;
  DWORD imageSize = decodedImage.length();
  
  HGLOBAL hMem = ::GlobalAlloc(GMEM_MOVEABLE, imageSize);
  if (!hMem)
      ErrorExit(TEXT("GlobalAlloc")); //http://msdn.microsoft.com/en-us/library/windows/desktop/ms682499(v=vs.85).aspx
  
  LPVOID pImage = ::GlobalLock(hMem);
  if (!pImage)
      ErrorExit(TEXT("GlobalLock"));
  
  CopyMemory(pImage, decodedImage.c_str(), imageSize);
  IStream* pStream = NULL;
  
  BitmapData* bitmapData = new BitmapData;
  if (::CreateStreamOnHGlobal(hMem, FALSE, &amp;pStream) != S_OK)
      ErrorExit(TEXT("CreateStreamOnHGlobal"));
  else
  {
      bitmap = Bitmap::FromStream(pStream);   //FAILS on WIN32
      if (!bitmap)
          ErrorExit(TEXT("FromStream"));
  
      RECT clientRect;
      GetClientRect(hwnd, &amp;clientRect);
  
      bitmapClone = bitmap-&gt;Clone(0, 0, clientRect.right, clientRect.bottom, PixelFormatDontCare);
      delete bitmap;
      bitmap = NULL;    
  }
  </code></pre>
  
  <p>But it fails on Windows 7 32-bit, specifically on this line:</p>
  
  <pre><code>bitmap = Bitmap::FromStream(pStream);
  </code></pre>
  
  <p>It always returns <code>NULL</code>, but I can't get how is this working on x64 but not in x86. If someone can enlighten me, I'll be grateful.</p>
  
  <p>Thanks!</p>