The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
If you get confused by a register dump, then you’ll just have to accept that some of my postings won’t make any sense
This Web site is not for beginners. I try to write for advanced programmers, and if you're not an advanced programmer, then you'll just have to accept that there will be times you are baffled by what I write. Often I dial the geek back a notch, explaining some things which should be "obvious" to an advanced programmer, such as why storing a constant pointer into a stack location from dynamically-generated code is a clear indicator of a framework thunk. But I will dial it back only so far, and eventually you may just be forced to (horrors!) do your own background research to get yourself up to speed or simply gi...
A different type of writing exercise, this time in preparation for buying a house
One of my colleagues was overwhelmed by how many times papers need to be signed when you buy a house. A seemingly endless stack of papers. Sign and date here, initial here, initial here, now sign this, and this, and this, and sign and date here, and sign here, and initial here... By the time it's over, your arm is about to fall off. Some years later, my colleague was about to buy a new house and began to dread the signature-fest that would invariably ensue at the closing. Another ten-foot-tall stack of papers that needed to be signed and initialed. In preparation, my colleague actually did hand exercises to ...
Changes to the the 2009/2010 Seattle Symphony subscription season
A thank-you to commenter Greg for pointing it out that the Seattle Symphony made changes to their UBS Masterworks 13 series after the brochures were printed. I compared my printed brochure against the online one and updated the 2009/2010 Seattle Symphony subscription season at a glance accordingly. They deleted five concerts and added six, so the Masterworks 13 series actually has 14 concerts. They probably kept the name for backward compatibility.
What is the purpose of the RunAsCommand value?
Commenter c_e_pizano asks what the purpose of the registry value is. Well, for starters, it isn't documented, so the official answer to that question is "Don't mess with it." Kind of makes me wonder why you're asking about the registry value anyway, seeing as it's undocumented in the first place. Are you trying to reverse-engineer Windows? To be honest, I don't know what its purpose is, but I do know what happens when you set it: Everything stops working. This is one of those abandoned features like . When it got abandoned, not all of the pieces got cleaned up, and there is still code that queries for the...
A process shutdown puzzle: Answers
Last week, I posed a process shutdown puzzle in honor of National Puzzle Day. Let's see how we did. Part One asked us to explain why the thread no longer exists. That's easy. One of the things that happen inside is that all threads (other than the one calling ) are forcibly terminated in the nastiest way possible. This happens before the notification is sent. Therefore, the code in that waits for the thread completion event waits forever because the is no longer running. There is nobody around to see the shutdown event and respond by setting the completion event. Okay, that was the easy part. Part Two ...
What the various registry data types mean is different from how they are handled
Although you can tag your registry data with any of a variety of types, such as or or . What do these mean, really? Well, that depends on what you mean by mean, specifically, who is doing the interpreting. At the bottom, the data stored in the registry are opaque chunks of data. The registry itself doesn't care if you lie and write two bytes of data to something you tagged as . (Try it!) The type is just another user-defined piece of metadata. The registry dutifully remembers the two bytes you stored, and when the next person comes by asking for the data, those two bytes come out, along with the type . Gar...
Being lucky is observing what you weren’t expecting: An illustration
I decided to begin searching for a replacement for my current laptop computer since it was by this point literally being held together with electrical tape, and I decided to go against my more common computer replacement policy of "Wait until it breaks, and then panic." There was one model I had my eye on, and it was on sale at a local big-box store as one of those doorbuster deals. I didn't feel like waking up at 4am to stand in line for the slim chance of actually snagging one, so I figured I would just wait, and maybe it'll go on sale again after the shopping season. (This is a strategy that isn't availab...
What is the terminology for describing the various parts of the registry?
Hives, keys, values, types, and data. As I noted some years ago, the file that holds the registry data is called a hive. A hive contains a tree of keys. Keys contain a list of values. Associated with each value is a type and data. The terminology is weird and counter-intuitive thanks to the history of the registry. Back in the days before named values, you queried the data associated with (the default value of) a key by calling , which was a rather natural name since it matches the key/value pattern. But the introduction of named values threw this pattern into disarray. Perhaps a better name could...
The 2009/2010 Seattle Symphony subscription season at a glance