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 cultural anthropology of getting on a bicycle

I can tell where you grew up by watching you get on a bicycle. Well, sort of. In my limited experience, I've observed two distinct ways of getting on a bicycle. The first is what I'll call the Chinese method, since it's the dominant technique in China, Taiwan, and Japan, as far as I can tell. To get on a bicycle using the Chinese method, ...

Why can't I see all of the 4GB of RAM in my machine?

Here's a question that came from a customer: I have set my boot options to /3GB /NOPAE. Even though the server has 4GB of physical memory, we see only 3.5GB of physical memory on the server after it boots up. However, when we change the boot options to /PAE, we can observe 4GB of memory. Furthermore, when I enable only /PAE, even though the ...

Exploiting the inattentive, episode 2: The unlabeled line

In Episode 1 we learned that "Snide" brand powdered laundry detergent comes with a scoop that holds 5/8 cup detergent, even though the directions call for only 3/8 cup. The intent here is to get people to use more detergent than necessary, thereby increasing sales. A box of detergent which should be sufficient for 30 loads...

Why does SetWindowsHookEx take an HINSTANCE parameter?

An anonymous commenter asked why the function takes an parameter if the first thing it's going to do is convert the instance handle into a file name. Because that's not how it worked in 16-bit Windows. In 16-bit Windows there was no such thing as hook injection. All 16-bit Windows applications ran in the same address space, so there was ...

Space scientist James Van Allen (1914–2006)

Discoverer of the Van Allen radiation belts and one of the TIME magazine men of the year for 1960 James Van Allen died yesterday. (What a coincidence. What are the odds that the person to discover the Van Allen radiation belts would also be named Van Allen?) I never met the man, but I met his granddaughter. She has an amazing facility with ...

One way people abused hooks in 16-bit Windows

We saw last time how windows hooks were implemented in 16-bit Windows. Even though the was an opaque data type that should have been treated like a handle, many programs "knew enough to be dangerous" and took advantage of the fact that the was just a pointer to the previous hook procedure. The most common way of abusing this knowledge ...

How were window hooks implemented in 16-bit Windows?

The mechanism for keeping track of window hooks was very different in 16-bit Windows. The functions involved were , and . The first two functions still exist today, but the third one has been replaced with a macro: Disclaimer: All code below is "reconstructed from memory". The spirit of the code is intact, but the precise details may be ...

A look inside WinInet's index.dat file and changes in IE7 and Vista

My frequent bicycling buddy Ari Pernick wrote a couple of articles over on the Windows Network Development blog on the topic of the file, which appears to have gotten a bit of attention lately. This past weekend, I joined Ari and another friend in a ride along the Upper Loop of the annual Tour De Peaks bicycle ride. I'd never done this ...

Candidate for most obscure keyboard shortcut: Shift+F8

One of the most obscure keyboard shortcuts has got to be Shift+F8, which is used for listbox discontiguous extended selection. Man, what a mouthful. KB article Q301583 doesn't help matters by listing this keyboard shortcut under "Dialog box keyboard shortcuts" even though it isn't a dialog box keyboard shortcut. It's a listbox keyboard ...

Even more about C# anonymous methods, from the source

If you want to know still more about C# anonymous methods, you can check out the web site of Grant Richins who has an entire category devoted to anonymous methods, and he should know, since he actually implemented them. Now that CLR week is over, I'm curious what you all thought of it. Would you like to see another CLR week at some point...