The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts

What does an NMI error mean? (The infamous "Hardware Malfunction")

I promised to talk more about NMI, so here it is. What generates an NMI? What does it mean? The first question is easy to answer but doesn't actually shed much light: Any device can pull the NMI line, and that will generate a non-maskable interrupt. Back in the Windows 95 days, a few really cool people had taken the ball-point pen trick one step further: They had a special expansion card in their computer with a cord coming out the back. At the end of the cord was a momentary switch like the one you might see on a quiz show. If you pressed it, the card generated an NMI. No fumbling around with ball-point ...

The politician's fallacy and the politician's apology

I learned this from Yes, Minister. They call it the politician's fallacy: As befits its name, you see it most often in politics, where poorly-thought-out solutions are proposed for urgent problems. But be on the lookout for it in other places, too. You might see somebody falling victim to the politician's fallacy at a business meeting, say. Something else I picked up is what I'm going to call the politician's apology. This is where you apologize for a misdeed not by apologizing for what you did, but rather apologizing that other people were offended. One blogger coined the word "fauxpology" to describe this ...

Please feel free to stop using DDE

A commenter asked, "As an application programmer, can I really ignore DDE if I need to interact with explorer/shell?" The answer is, "Yes, please!" While it was a reasonable solution back in the cooperatively-multitasked world of 16-bit Windows where it was invented, the transition to 32-bit Windows was not a nice one for DDE. Specifically, the reliance on broadcasts to establish the initial DDE conversation means that unresponsive programs can jam up the entire DDE initiation process. The last shell interface to employ DDE was the communication with Program Manager to create program groups and items inside th...

I wouldn't be surprised if O. J. Simpson wrote a new book

You know, it's gotten to the point where I wouldn't be surprised if O. J. Simpson wrote a new book titled If I Were the Father of Anna Nicole Smith's Baby. Just saying.

The 2007/2008 Seattle Symphony subscription season at a glance

Every year, I put together a little pocket guide to the Seattle Symphony subscription season for my symphony friends to help them decide which ticket package they want. As before, you might find it helpful, you might not, but here it is anyway. Notes: This chart doesn't include "one-off" concert series such as the Visiting Orchestras or Distinguished Artists series. Explanations for the partial blocks: The 18A series gets the 11/8 program; 18B gets 11/10. The Musically Speaking concerts typically omit one of the pieces from the evening program, substituting on-stage commentary. The comments column very cru...

Final remarks on LockWindowUpdate

It's not all that useful any more.

How to get your laptop to resume from standby in under two seconds

One of my colleagues recently posted the story of the work he did to get laptops to resume quickly. The fun part was implementing the optimizations in the kernel. The not-fun part was finding all the drivers who did bad things and harassing their owners into fixing the bugs. One some laptops, he could get the resume time down to an impressive one second. And then entropy set in. It's likely you've never seen a real off-the-shelf laptop resume this quickly. And the reason is that as soon as you stop twisting the arms of all the driver writers, they stop worrying about how fast your laptop resumes and go back t...

With what operations is LockWindowUpdate not meant to be used?

Okay, now that we know what operations is meant to be used with, we can look at various ways people misuse the function for things unrelated to dragging. People see the "the window you lock won't be able to redraw itself" behavior of and use it as a sort of lazy version of the message. Though sending the message really isn't that much harder than calling . It's twenty more characters of typing, half that if you use the macro in . As we noted earlier, only one window in the system can be locked for update at a time. If your intention for calling is merely to prevent a window from redrawing, say, becaus...

Mandarin Chinese gaining popularity in public schools

NPR reports that Mandarin Chinese is gaining popularity in public schools. (But please oh please don't take pronunciations lessons from the student at time code 3:25. His first tone was clearly a second—falling victim to the classic mistake of applying English tone shaping to Chinese syllables.) On the other hand, some of those students who chose to study Mandarin Chinese didn't, um, do their homework: Some say they are here by accident or because they thought it would be an easy "A". Oops. I do admire the argument of one parent against learning Chinese: Everybody is going to speak English. I'm sure t...