| |
| | The Old New Thing : The ways people mess up IUnknown::QueryInterface |
 | | IShellFolder *psf; IUnknown *punk; CoCreateInstance(CLSID_xyz,..., IID_IShellFolder, (void**)andpsf); psf->QueryInterface(IID_IUnknown, (void**)andpunk); CoCreateInstance(CLSID_xyz,..., IID_IUnknown, (void**)andpunk); punk->QueryInterface(IID_IShellFolder, (void**)andpsf); |
 | | Yet this is perfectly legal since all objects derive from IUnknown. |
 | | Besides, it would prevent querying for interfaces other than IUnknown, so I don't really think that would be more correct. |
| blogs.msdn.com /oldnewthing/archive/2004/03/26/96777.aspx (3048 words) |
|