The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Microspeak: Operationalize
May 1, 2007
Post comments count 0
Post likes count 0

Microspeak: Operationalize

Raymond Chen
Raymond Chen

Here are a few citations for the word operationalize. A lot of work lies ahead to operationalize this plan. Provide security guidance and tools to help operationalize security for enterprise environments. I thought it meant "carry out" or "put into effect", and then I saw this sentence: Operationalize the demo (get computers configured, install software, verify network access). Now I'm not sure any more.

Everyone should have a house pianist
Apr 30, 2007
Post comments count 0
Post likes count 0

Everyone should have a house pianist

Raymond Chen
Raymond Chen

Last year, a request was sent out to a social mailing list that went something like this: Hi, everybody. My girlfriend is coming to visit for a week, and she's a pianist. Does anybody have a piano they would be willing to let her practice on while she's here? I offered the piano in my living room and gave him the key to my house. I came home one day to hear the house filled with the resonant chords of a Beethoven piano sonata. You can have all the recordings you want. There's nothing like experiencing music played live right in front of you. The music fills your body in a way recordings simply are not capable ...

The default verb is not necessarily "open"
Apr 30, 2007
Post comments count 0
Post likes count 0

The default verb is not necessarily "open"

Raymond Chen
Raymond Chen

If you hunt around the Internet you'll find lots of people† who hard-code the string as the second parameter to the function, indicating that they want to open the document specified as the third parameter. While that's a nice thing to want to do, it might not be the right thing. When the user double-clicks a document, the shell executes the default verb, which is not necessarily "open". For example, for audio files, the default verb is often "play", and for pictures, it's often "view". If you want to launch the document as if the user had double-clicked it, then you need to pass as the . Commenter br...

News Flash: Not being able to watch Jay Leno is not an emergency
Apr 27, 2007
Post comments count 0
Post likes count 0

News Flash: Not being able to watch Jay Leno is not an emergency

Raymond Chen
Raymond Chen

The Mesa (Arizona) Police Department reminds us in a press release that 9-1-1 is for emergencies, and the inability to watch Jay Leno due to a power outage does not qualify as an emergency. (Noting, because everybody else will, that this is not the same as the unconfirmed of the woman who called 9-1-1 for a cheeseburger emergency.) Update: First link appears to be dead. A snippet of the article can be found here; search for "Mesa Police". Update 2: First link repaired thanks to commenter Maurits.

Stupid debugger tricks: Calling functions and methods
Apr 27, 2007
Post comments count 0
Post likes count 0

Stupid debugger tricks: Calling functions and methods

Raymond Chen
Raymond Chen

Back in the old days, if you wanted to call a function from inside the debugger, you had to do it by hand: Save the registers, push the parameters onto the stack (or into registers if the function uses or ) push the address of the function, move the instruction pointer to the start of the function you want to call, then hit "g" to resume execution. The function runs then returns to the , where the debugger regains control and you can look at the results. Then restore the registers (including the original instruction pointer) and resume debugging. (That paragraph was just a quick recap; I'm assuming you already...

The intermediate value theory helps your table but not necessarily your beer
Apr 26, 2007
Post comments count 0
Post likes count 0

The intermediate value theory helps your table but not necessarily your beer

Raymond Chen
Raymond Chen

An Australian mathematician applied intermediate value theory to the problem of keeping a table from wobbling: Just rotate the table and you'll eventually find a spot. A few things struck me about that article. First, that it explains that intermediate value theory "is the same principle underlying the fact that there will always be two points with exactly the same temperature somewhere on Earth." While that's true, it's way overkill. Intermediate value theory lets you find two points on any circle with the same temperature; you don't need a whole sphere. (Perhaps they got the scenario mixed up with the Borsuk-...

Using the "gu" debugger command to find the infinite loop
Apr 26, 2007
Post comments count 0
Post likes count 0

Using the "gu" debugger command to find the infinite loop

Raymond Chen
Raymond Chen

Somebody says, "Your program is consuming 100% CPU" and hands you a debug session. Usually, this happens because one thread has gotten stuck in an infinite loop. And if you're lucky it's the type of infinite loop that's easy to diagnose because it's just one function that isn't returning. (The more complicated types are where a function does some work and then returns, and then some of that work has a delayed effect that causes the function to run again, and so on.) Let's assume we're lucky because, well, debugging is an exercise in optimism. The first step is to find the thread that is using all the CPU. Tha...

There's something about Christopher Walken
Apr 25, 2007
Post comments count 0
Post likes count 0

There's something about Christopher Walken

Raymond Chen
Raymond Chen

Actor Christopher Walken has such a peculiar speaking style, he's inspired a theater show: All About Walken. The run ends soon, so if you're going to see it, you'll have to act fast.

Identifying an object whose underlying DLL has been unloaded
Apr 25, 2007
Post comments count 0
Post likes count 0

Identifying an object whose underlying DLL has been unloaded

Raymond Chen
Raymond Chen

Okay, so I gave it away in the title, but follow along anyway. Your program chugs along and then suddenly it crashes like this: Instantly you recognize the following: This is a virtual method call. (Call indirect through register plus offset.) — Very high confidence. The vtable is in . (That is the base register of the indirect call.) — Very high confidence. The underlying DLL for this object has been unloaded. (The memory that contains the vtable is not valid and its address is consistent with once having been in valid code.) — High confidence. This is a cal...