title: How to get detail error info from E_FAIL?
body: <p>When I use ATL in MFC Application(Don't ask me why, just because I like), sometimes I got the error code: <strong>E_FAIL</strong>. However, it's almost useless for me to locate the specific reason.</p>
  
  <p>I have googled so many times, but found nothing related. I thought there should be something like <code>try{} catch{}</code> in ATL.</p>
  
  <p>Here's some sample code:</p>
  
  <pre><code>CAxWindow  m_wndView;  // ActiveX host window class.
  CComPtr&lt;IWMPPlayer&gt;  m_spWMPPlayer;  // Smart pointer to IWMPPlayer interface.
  
  AtlAxWinInit();
  CComPtr&lt;IAxWinHostWindow&gt;  spHost;
  HRESULT  hr;
  CRect rcClient;
  GetClientRect(&amp;rcClient);
  m_wndView.Create(m_hWnd, rcClient, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE);
  //when I switch to Static Link to ATL from Dynamic Link to ATL, I always get E_FAIL
  hr = m_wndView.QueryHost(&amp;spHost);
  </code></pre>
  
  <p>Anyone can help me?</p>