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 sociology of the mobile phone

It has become obvious by now that the mobile phone has changed the way people interact. These two papers were forwaded to me by a colleague, whose summary I am shamelessly lifting from heavily. First is a short paper titled Exploring the implications for social identity of the new sociology of the mobile phone. The much more fascinating...

Importance of alignment even on x86 machines

Sometimes unaligned memory access will hang the machine. Some video cards do not let you access all the video memory at one go. Instead, you are given a window into which you can select which subset of video memory ("bank") you want to see. For example, the EGA video card had 256K of memory, split into four 64K banks. If you wanted to access...

Why do some structures end with an array of size 1?

Some Windows structures are variable-sized, beginning with a fixed header, followed by a variable-sized array. When these structures are declared, they often declare an array of size 1 where the variable-sized array should be. For example: typedef struct _TOKEN_GROUPS { DWORD GroupCount; SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]; } ...

Why can’t you treat a FILETIME as an __int64?

The FILETIME structure represents a 64-bit value in two parts: typedef struct _FILETIME { DWORD dwLowDateTime; DWORD dwHighDateTime; } FILETIME, *PFILETIME; You may be tempted to take the entire FILETIME structure and access it directly as if it were an __int64. After all, its memory layout exactly matches that of a 64-bit (little-...

Beware of non-null-terminated registry strings

Even though a value is stored in the registry as REG_SZ, this doesn't mean that the value actually ends with a proper null terminator. At the bottom, the registry is just a hierarchically-organized name/value database. And you can lie and get away with it. Lots of people lie about their registry data. You'll find lots of things that ...

The kooky STRRET structure

It was designed when computers were a lot slower.

Finished competing in your event? Let the games begin!

Ten thousand human beings in peak physical condition. All in one dormitory complex. With 130,000 free condoms. Let the games begin! And you have to tip your hat (tam?) to The Scotsman for finding an athlete named "Randy Jones" for this article...

Summary of the recent spate of /3GB articles

A table of contents now that the whole thing is over. I hope. I'm not sure how successful this series has been, though, for it appears that even people who have read the articles continue to confuse virtual address space with physical address space. (Or maybe this person is merely mocking a faulty argument? I can't tell for sure...

Writing your own menu-like window

Hereby incorporating by reference the "FakeMenu" sample in the Platform SDK. It's in the winui\shell\fakemenu directory. For those who don't have the Platform SDK, what are you doing writing Win32 programs without the Platform SDK? Download it if it didn't come with your development tools. If for some reason you don't want the Platform SDK...

The curious interaction between PAE and NX

Carmen Crincoli covered the interaction between PAE and NX on his own blog, so I'll merely incorporate his remarks by reference. (And notice again the concession to backwards compatibility. Without the backwards compatibility work, XP SP2 would have shipped with NX support and an asterisk, "* and those of you who have device drivers ...