don't know how to use IShellWindows::Item correctly
问题 I'm using VC6 on XP system. The following is my code. It runs perfectly on my computer, but on other computers it seems that pisw->Item(v, &pidisp) doesn't equals to S_OK. Now I'm trying to figure out what's wrong here IShellWindows *pisw; if (SUCCEEDED(CoCreateInstance(CLSID_ShellWindows, NULL, CLSCTX_ALL, IID_IShellWindows, (void**)&pisw))) { VARIANT v; V_VT(&v) = VT_I4; IDispatch *pidisp; found = FALSE; for (V_I4(&v) = 0; !found && pisw->Item(v, &pidisp) == S_OK; V_I4(&v)++) {