The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
    Why do new controls tend to use COM instead of window messages?
Commenter David wonders why new controls tend to use COM instead of window messages. "It seems that there must have been a decision to only develop COM controls after the invention of COM." There have been plenty of Win32 controls invented after the invention of COM. In fact, the entire common controls library was developed after the invention of COM. All your old friends like the list view, tree view, and property sheets are good old Win32 controls. But it's true that the newer stuff tends to use COM. Why is that? I am not aware of any grand pronouncement on this subject. Each team makes a decision that th...
    A different perspective from the first row of the symphony
On the weekend of November 10 during the 2007–2008 Seattle Symphony season, the symphony performed both Brahms piano concerti and two of his symphonies in consecutive concerts. My subscription included one of them, and I bought a separate ticket to the other one, and the seat I was given was in the very front row. You notice all sorts of things when you're in the very front row, things that elude your notice from even the second or third row. When you're that close, you're within an arm's reach of the musicians. I had to look away when the concertmaster bent over to tune the orchestra; otherwise I wo...
    The great thing about naming conventions is that not everybody will follow them
The naming convention for is «facility»«severity»«name», where the facility portion (and the underscore) is omitted if the facility is or . Good luck finding anybody who follows this naming convention. Okay, fine, if you look closely you might be able to find some people who do. Actually, I guess I was a bit too pessimistic when I said nobody follows it. It seems that the majority of Windows components do follow this convention, although there are some notable exceptions. There are also some people who decided to confuse matters further by using the convention for erro...
    Isn't every dinner at a technology conference a geek dinner?
I'm always amused when somebody announces that they're having a geek dinner at a technology conference. I mean, at a conference like that, every dinner is a geek dinner. The geek density is so high, +4 enchanted vorpal swords quiver in fear. [Update 8am: Fixed broken permalink. Yay, they broke a permalink...]
    What is the maximum number of timers a program can create?
As MSDN correctly notes, "Timers are a limited global resource." How limited are they? (We're talking about timers created by .) Not as limited as they once were. Originally, there were eight timers total for the entire system. When there are only eight timers, you have to be very careful not to waste them and to destroy them when they aren't needed. Windows 3.0 increased this to 32. Windows 95 increased this to around 2500, although the debug version of Windows got mad at you if a single program created more than 32. Windows NT 3.1 would create timers until you exhausted the desktop heap...
    The way to stop people from copying files to a folder is to use NTFS security, not to block drag/drop
A customer wanted to prevent users from copying files to certain locations, and they did it by hooking functions like and failing the operation if the parameters were not to its liking. The customer found that the hooks stopped working in Windows Vista because Explorer in Windows Vista uses the new COM interface instead of using the old function. The customer wanted assistance in getting their hook working again so they could prevent users from copying files to directories they wanted to block. Well, first of all, arbitrary function hooking is not supported by any version of Windows, so the customer was alrea...
    In Ephesus, you juggle or die
In 1987, The Flying Karamazov Brothers performed their interpretation of Shakespeare's A Comedy of Errors. When I watched this show (part 1, part 2) when it first aired, it was my introduction both to the juggling team and to the play. It also reinforced my impression that Shakespeare was meant to be performed and not merely read. The jokes simply don't work as well when you merely read them. For some reason, I still remember the tiny juggling mishap in the final seconds of the show (part 2, time code 1:05:14): The actress at the far left edge of the screen (Luciana) drops a pin but covers up t...
    Meta-content: Suggestion Box 4 will open sometime next year
Yesterday, I finished composing the last entry taken from an item in Suggestion Box 3. My prediction that the backlog would clear in early 2010 was off by exactly one year: The last Suggestion Box 3 entry is scheduled to be posted on January 3, 2011. I figure I'll open Suggestion Box 4 sometimes next year. But I'll leave it open for only a little while, to avoid the problem with Suggestion Box 3 where I left it open for so long that it took six years to clear out. (Then again, maybe I should stick to a six-year cycle for emptying the Suggestion Box. That would certainly discourage people fr...
    My phone just DoS'd my office network
The other day I was working in my office minding my own business when I suddenly lost network connectivity. I couldn't contact any machines other than the ones in my office. When this happens, I go through some basic troubleshooting steps. Is my neighbor's network okay? How about power-cycling the affected machines? Refreshing the TCP/IP security policies? None of that seemed to work, so I called the network helpdesk, on the assumption that my port was shut down because I somehow missed an e-mail message announcing a mandatory security patch that I had failed to keep up with. My office has an IP phone. It's har...