Raymond Chen's blog has an interesting example of querying information from an Explorer window. Interesting not for the way in which it introspects down through the multiple-interface objectery of Windows to get at the data, but because it exemplifies, for me, the reasons I dislike C++, and Windows C++, so much.
Take a look (should you feel like it) at his final example (at the end of that page). He excuses the ugliness by saying "because I put everything into one huge function instead of breaking them out into subfunctions", and indeed, this is partly an excuse. But look at the actual code; that ever-deepening cascase of nested ifs matched by the sudden flurry of CoTaskMemFree and Release calls. I have to wonder how much simpler this would be in a dynamic language, with grown-up memory management. But, as Raymond often points out, that's legacy for ya.
The syntax of C++ also grates, after a good couple of years now with the simpler, more streamlined Python; stuff like if (SUCCEEDED(pwba->QueryInterface(IID_ISer
But then I'm a curmudgeonly old Hector at the best of times...
 I don't know if this is a real word, but it should be, shouldn't it? Like an orangery is to oranges.