Raymond Chen

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

Post by this author

Went to a Seattle Thunderbirds game this weekend

This past weekend I fell into tickets to a Seattle Thunderbirds game. (The Seattle Thunderbirds belong to the "U.S. Division" of the otherwise-Canadian Western Hockey League, one of the three Major Junior Leagues.) I hadn't been to a hockey game since my college days. It was quite enjoyable and I may very well do it again. On the ...

Why are HANDLE return values so inconsistent?

If you look at the various functions that return s, you'll see that some of them return (like ) and some of them return (like ). You have to check the documentation to see what each particular function returns on failure. Why are the return values so inconsistent? The reasons, as you may suspect, are historical. The values were chosen to...

Why 16-bit DOS and Windows are still with us

Many people are calling for the abandonment of 16-bit DOS and 16-bit Windows compatibility subsystems. And trust me, when it comes time to pull the plug, I'll be fighting to be the one to throw the lever. (How's that for a mixed metaphor.) But that time is not yet here. You see, folks over in the Setup and Deployment group have gone and...

The correct order for disabling and enabling windows

If you want to display modal UI, you need to disable the owner and enable the modal child, and then reverse the procedure when the modal child is finished. And if you do it wrong, focus will get all messed up. If you are finished with a modal dialog, your temptation would be to clean up in the following order: But if you do that, ...

Why do timestamps change when I copy files to a floppy?

Floppy disks use the FAT filesystem, as do DOS-based and Windows 95-based operating systems. On the other hand, Windows NT-based systems (Windows 2000, XP, 2003, ...) tend to use the NTFS filesystem. (Although you can format a drive as FAT on Windows NT-based systems, it is not the default option.) The NTFS and FAT filesystems store ...

Why can't I put hotlinks in notification icon balloon tips?

The short answer: "Because there is no NIF_PARSELINKS flag." The long answer: When balloon tips were first developed, there was no ability to embed links. Consequently, programs were free to put insecure text in balloon tips, since there was no risk that they would become "live". So, for example, a virus scanner might say "The document 'XYZ...

What's so special about the desktop window?

The window returned by GetDesktopWindow() is very special, and I see people abusing it all over the place. For example, many functions in the shell accept a window handle parameter to be used in case UI is needed. IShellFolder::EnumObjects, for example. What happens if you pass GetDesktopWindow()? If UI does indeed need to be ...

Invalid thread and process IDs

Perhaps you want a value to use as a sentinel, which you want to be guaranteed is never a valid thread ID or process ID. What values can you use? Nothing is explicitly written about this topic, but you can put on your logic cap and figure it out. If you need an invalid thread ID, you can use zero. How do you know that zero is an ...

And we will build a processor with… ONE MILLION TRANSISTORS!

Insert pinky.

Raymond's comment policy

Okay, I was hoping it wasn't going to be needed but it takes only one bad apple... Here are the ground rules. Things that increase the likelihood that your comment will be edited or deleted: If a wave of comment spam is under way, I may choose to moderate or even close comments until the problem subsides. More rules may be added later...