title: why I can't hook a ie
body: <p>I want to trace all the mouse and keyboard action in IE.
  So I write a hook, 
  but I found that the hook can't work.
  when I hook the IE, and make any action on IE, the IE crashed.</p>
  
  <p>the step is as following.</p>
  
  <p>step.1:</p>
  
  <pre><code>g_hHook = ::SetWindowsHookEx(WH_CALLWNDPROC, (HOOKPROC)CallWndProcHtmlHook, g_hInstHookDll, id);
  </code></pre>
  
  <p>step.2:</p>
  
  <pre><code>LRESULT CallWndProcHtmlHook(int nCode, WPARAM wParam, LPARAM lParam)
  {
      return CallNextHookEx(g_hHook, nCode, wParam, lParam);
  }
  </code></pre>
  
  <p>in winxp, sometimes, it is ok.
  but it never workded in win7( win7,32bits, with IE8)</p>