The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

The tale of the radioactive Boy Scout
Sep 19, 2006
Post comments count 0
Post likes count 0

The tale of the radioactive Boy Scout

Raymond Chen
Raymond Chen

Under no circumstances should you attempt this at home.

Why doesn't the Shutdown dialog use Alt to get alternate behavior?
Sep 19, 2006
Post comments count 0
Post likes count 0

Why doesn't the Shutdown dialog use Alt to get alternate behavior?

Raymond Chen
Raymond Chen

When you select "Shut Down" from the Start menu, a dialog appears with three options: "Stand By", "Turn Off" and "Restart". To get the secret fourth option "Hibernate" you have to press the shift key. Would the Alt key be the more obvious choice for revealing alternate options? You might think so, but it so happens that Alt already has meaning. In this dialog, the Alt key would be a disaster, because the underlined letters indicate keyboard accelerators, which are pressed in conjunction with the Alt key. In other words, from the Shut Down dialog, you can type Alt+S to stand by, Alt+U to turn off, or Alt+R to res...

Project Update 2: Voyage to Our Hollow Earth
Sep 18, 2006
Post comments count 0
Post likes count 0

Project Update 2: Voyage to Our Hollow Earth

Raymond Chen
Raymond Chen

If everything went according to plan, the trip to the hole in the Arctic Ocean should have completed a few months ago. I went to the web site to see what they found, only to discover that it's been postponed another year, to June 26, 2007. This is clearly the handiwork of the world government attempting to suppress the release of information they have all held in secret for decades. All their attempts to prevent the discovery of the polar opening only serves to confirm its existence!

Sometimes my psychic powers are weak
Sep 18, 2006
Post comments count 0
Post likes count 0

Sometimes my psychic powers are weak

Raymond Chen
Raymond Chen

Why does my MFC program exit unexpectedly? The stack trace at the point we hit goes like this: Thanks. You can already see some of what's going on, but clearly more information is needed. My first psychic suggestion was to examine MFC's message pump to see what causes it to exit. Then follow the money backwards. That's what we want to know and what we want to find out. MFC comes with source code so you can do this yourself. Don't expect somebody to do your debugging for you. You have the tools to do it yourself: You have the source code and you have a brain. Once you figure out what conditions make...

Disaster averted, thanks to international time zones
Sep 15, 2006
Post comments count 0
Post likes count 0

Disaster averted, thanks to international time zones

Raymond Chen
Raymond Chen

Boy, the world has been really lucky this year. After successfully avoiding a massive tsunami in the Atlantic Ocean, the world narrowly escaped global disaster as predicted by Yisrayl Hawkins, leader of the organization The House of Yahweh. What saved us? Well, I'll let Mosheh Sang, leader of the organization in Kenya, explain: According to Sang, a nuclear war between the US and North Korea only failed to kick off Tuesday as expected due to difference in international time zones. But they're not giving up yet. According to another leader, Eleazor Kamotho Mugwe: It can take up to seven years from now for t...

Allocating and freeing memory across module boundaries
Sep 15, 2006
Post comments count 0
Post likes count 0

Allocating and freeing memory across module boundaries

Raymond Chen
Raymond Chen

I'm sure it's been drilled into your head by now that you have to free memory with the same allocator that allocated it. matches , matches , matches . But this rule goes deeper. If you have a function that allocates and returns some data, the caller must know how to free that memory. You have a variety of ways of accomplishing this. One is to state explicitly how the memory should be freed. For example, the documentation explicitly states that you should use the function to free the buffer that is allocated if you pass the flag. All s must be freed with . And all memory returned across COM interface bound...

The lost follow-ups: Products and people that appear to have vanished without a trace
Sep 14, 2006
Post comments count 0
Post likes count 0

The lost follow-ups: Products and people that appear to have vanished without a trace

Raymond Chen
Raymond Chen

There'll be the big announcement promising a revolution in the computer industry, lots of press coverage, and then... nothing. What ever happened to these companies and products? Does anybody know?

The danger of using boldface for Chinese characters
Sep 14, 2006
Post comments count 0
Post likes count 0

The danger of using boldface for Chinese characters

Raymond Chen
Raymond Chen

Intricacies become lost in the ink.

Raymond's excursions into East Asian pop music, episode 3: Morning Musume (モーニング娘)
Sep 13, 2006
Post comments count 0
Post likes count 0

Raymond's excursions into East Asian pop music, episode 3: Morning Musume (モーニング娘)

Raymond Chen
Raymond Chen

It really all started with Katamari Damacy (塊魂). The music for that game is so darned infectious, and it was my fascination with that music that prompted my colleague to loan me the CDs his wife bought while she traveled through Asia. I already mentioned China Dolls (中國娃娃). Another of the CDs in the collection was 4th Ikimasshoi! (4th いきまっしょい! = 4th Let's Go!), the um fourth album from the J-Pop group Morning Musume (モーニング娘 = Morning Girls). I'm sure somebody will correct my Jap...