The Old New Thing

The curious pattern of pre-emptively rejecting the solution to your problem

A frustrating pattern that shows up occasionally in customer questions is the case where the customer poses a problem, and pre-emptively rejects the mechanism explicitly designed to solve that problem. How can we change the widget color without using IWidget::Set­Color? Um, the whole point of IWidget::Set­Color is to change the ...

Optimizing the Chili’s dining experience

Back in the days of Windows 95, one of my colleagues paid a visit to his counterparts over in the Windows NT team as part of a continuing informal engagement to keep the Windows NT developers aware of the crazy stuff we've been doing on the Windows 95 side. One particular time, his visit occurred in late morning, and it...

Old trace logs in your dreams

I dreamed that I was archiving old data. Some came off an old CP/M floppy disc. Another was an IntelliTrace debug log from the 1980's. Back then, IntelliTrace recorded the history onto index cards, which were stored in trays like in a library card catalog. Made jumping back and forth really easy, but setting breakpoints was a pain...

Obtaining the parsing name (and pidl) for a random shell object

The parsing name for a shell item is handy, because it lets you regenerate the item later. Actually, the pidl for the shell item is even better, because that is the official way of saving and restoring objects. It's the pidl that gets saved in a shortcut, and since shortcuts can be copied around from machine to machine, pidls must be ...

The annual sporting event involving a football that dare not speak its name and a digression into the sportsmanship of wasting time in nonproductive activity

I always wonder about people who are so protective of the name of their event that they don't even allow people to mention it by name. One of the most notorious examples is the organization which runs a major international gathering of athletes which takes place every four years (or every two years if you consider warm-weather sports and cold-...

Psychic debugging: Why your IContextMenu::InvokeCommand doesn’t get called even though you returned success from IContextMenu::QueryContextMenu

A customer was having trouble with their IContext­Menu implementation. They observed that their IContext­Menu::Query­Context­Menu method was being called, but when the user selected their menu item, IContext­Menu::Invoke­Command was not being called. Given what you know about shell context menus, you can already ...

Why doesn’t HeapValidate detect corruption in the managed heap?

A customer had a program that was corrupting the managed heap by p/invoking incorrectly. The problem didn't show up until the next garbage collection pass, at which point the CLR got all freaked-out-like. "According to Knowledge Base article 286470, the tool is supposed to catch heap corruption, but it doesn't catch squat." Depending on ...

Poisoning your own DNS for fun and profit

When you type a phrase into the Windows Vista Start menu's search box and click Search the Internet, then the Start menu hands the query off to your default Internet search provider. Or at least that's what the Illuminati would have you believe. A customer reported that when they typed a phrase into the Search box and clicked Search the ...