title: don't know how to use IShellWindows::Item correctly
body: <p>I'm using VC6 on XP system. </p>
  
  <p>The following is my code. It runs perfectly on my computer, but on other computers it seems that  pisw->Item(v, &amp;pidisp) doesn't equals to S_OK. Now I'm trying to figure out what's wrong here</p>
  
  <pre><code>  IShellWindows *pisw;
    if (SUCCEEDED(CoCreateInstance(CLSID_ShellWindows, NULL, CLSCTX_ALL,
                               IID_IShellWindows, (void**)&amp;pisw))) {
    VARIANT v;
    V_VT(&amp;v) = VT_I4;
    IDispatch  *pidisp;
    found = FALSE;
  
    for (V_I4(&amp;v) = 0; !found &amp;&amp; pisw-&gt;Item(v, &amp;pidisp) == S_OK; V_I4(&amp;v)++) {
       IWebBrowserApp *piwba;
      if (SUCCEEDED(pidisp-&gt;QueryInterface(IID_IWebBrowserApp, (void**)&amp;piwba))) {
                 //  blablabla....do something..
    }
  </code></pre>
  
  <p>So I changed some code to</p>
  
  <pre><code>...
  IDispatch *pidisp;
  hr = pisw-&gt;Item(v, &amp;pidisp);
  if (SUCCEEDED(hr))
  {
        for (V_I4(&amp;v) = 0; !found ; V_I4(&amp;v)++) {
       IWebBrowserApp *piwba;
       if (SUCCEEDED(pidisp-&gt;QueryInterface(IID_IWebBrowserApp, (void**)&amp;piwba))) {
                 //  blablabla....do something..
     }
  </code></pre>
  
  <p>}</p>
  
  <p>then the return value of hr becomes to 1. And it gets access violation errors when running to "pidisp->.." step. Can anyone help me?</p>