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

The 2005 Seattle Chicken Tour

Mark your calendars for the 2005 Seattle Chicken Tour, scheduled this year for July 16th. Seattle Tilths Annual City Chickens and Coop Tour July 16, 2005   10 am — 4 pm $10 per family or group of four Seattles city chickens owners invite you into their backyards for a first-hand look at raising chickens. Discover the variety of ...

If strncpy is so dangerous, why does Visual Studio 2005 still support it?

In response to the news that is so dangerous, at least one person has called for Visual Studio to revoke support for such a dangerous function, considering the continued support for the function grounds for holding the compiler manufacturer liable for any defects in programs compiled with that compiler. Well, for one thing, while it's true...

Why don't you ever see a rat vomiting?

Okay, maybe you never wondered why you never saw a vomiting rat, but the intrepid researchers at the Annals of Improbable Research have discovered that there's a good reason, and Anne's rat page will explain in more detail than you probably wanted...

Using /LARGEADDRESSAWARE on 64-bit Windows for 32-bit programs

Probably the biggest advantage of 64-bit Windows is not the larger registers but rather the expansive 64-bit address space. Recall that even when the /3GB switch is set, 32-bit programs receive only 2GB of address space unless they indicate their willingness to cope with addresses above 2GB by passing the /LARGEADDRESSAWARE flag. This flag ...

Using modular arithmetic to avoid timing overflow problems

In an earlier article, I presented a simple way of avoiding timing overflows which seemed to create a bit of confusion. The short version: Given a starting time start, an ending time end and an interval interval, the way to check whether the interval has elapsed is to use the expression . The naive expression suffers from integer overflow ...

Shocked (shocked!) that patronage exists in Chicago politics

NPR reported on a startling discovery in Chicago: That government jobs go not to those best qualified to perform them, but rather to those with the best connections. Who'd-a thunk it? Shocked by this discovery, the Daley administration vowed to end it. The City of Chicago's top lawyer Mara Georges told incredulous City Hall reporters ...

You can't simulate keyboard input with PostMessage

Some people attempt to simulate keyboard input to an application by posting keyboard input messages, but this is not reliable for many reasons. First of all, keyboard input is a more complicated matter than those who imprinted on the English keyboard realize. Languages with accent marks have dead keys, Far East languages have a variety of ...

When is x/2 different from x>>1?

Everyone "knows" that the following pairs of expressions are equivalent: Too bad they aren't. In the C language standard, there is no requirement that the internal representation of signed integers be two's complement. All the permissible representations agree for positive numbers, but negative numbers can have different representations. If...

Why does Add or Remove Programs show a large blank space?

Some people have noticed that certain programs cause the Add or Remove Programs control panel to create an enormous amount of blank space. What's going on? These are programs that have bad custom uninstall icon registrations. If you go to the registry key , you'll find a list of programs that have registered for appearing in the Add or ...

The effect of SetCursor lasts only until the next SetCursor

Of course the effect of the function for a thread lasts only until that thread changes the cursor to something else. Any moron knows that, right? The tricky part is that the may come from an unexpected place. THe most common place people run into this is when they do something like this: This puts up the hourglass during the ...