The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Jul 12, 2006
Post comments count 0
Post likes count 0

Win $5000 every summer for life (some restrictions on your life apply)

Raymond Chen

Back in 2003, M&M offered a chance to win $5000 every summer for life, but if you looked more carefully, the offer actually read, "Win $5000 Every Summer For Life*", and the asterisk at the bottom read, "Maximum 50 years". That fine print was filled with strange stuff. For example, 3. Sponsor responsible only for delivery of prize; not responsible for prize utility, quality or otherwise. ... 10. Sponsor: M&M/Mars, High Street, Hackettstown, NJ 07840. One of the prizes was approximately ten pounds of M&Ms. The logical conclusion: "M&M is not responsible for the quality of M&Ms." I was remi...

Jul 12, 2006
Post comments count 0
Post likes count 0

Pidls and monikers do roughly the same thing, just backwards

Raymond Chen

When operating with the Windows shell, you will almost certainly find yourself at some point working with a pointer to an item ID list, known also as a "pidl" (rhymes with "middle"). On the other hand, when working with OLE you may find yourself having do deal with monikers. In a sense, they both do the same thing. They let you refer to some sort of object inside a namespace (to which you can bind or otherwise operate on), they have a hierarchical structure, you can persist them, and so on. Why, then, did the Windows shell team invent pidls when monikers do the same thing? The fundamental difference between pid...

Jul 11, 2006
Post comments count 0
Post likes count 0

News flash: Big houses have bigger heating bills

Raymond Chen

Big houses have bigger heating bills. Thanks, Associated Press! I learn something new every day. (Previous amazing fact.)

Jul 11, 2006
Post comments count 0
Post likes count 1

Not everybody with a non-Windows partition type is a geek

Raymond Chen

In the discussions following why Windows setup lays down a new boot sector, some commenters suggested that Windows setup could detect the presence of a non-Windows partition as a sign that the machine onto which the operating system is being installed belongs to a geek. In that way, the typical consumer would be spared from having to deal with a confusing geeky dialog box that they don't know how to answer. The problem with this plan is that not everybody with a non-Windows partition type is necessarily a geek. Many OEM machines ship with a hard drive split into two partitions, one formatted for Windows and th...

Jul 10, 2006
Post comments count 0
Post likes count 0

Wenn Ausländer Deutsch phonetisch singen

Raymond Chen

When foreigners sing German phonetically, the results are kind of painful. Listen, if you dare, to Johnny Cash sing "Wer kennt den Weg? (I Walk the Line)" [WMV] [Real]. If you can't get enough, you can grab the lyrics and sing along. Listening to the recording brought back painful memories of my high school German class, where there were those students who simply couldn't lose their thick American accents. It has been twenty years since I last studied German formally, and I'm certain that my own German pronunciation has picked up a Swedish accent in the meantime. My vocabulary has also deteriorated (on that ...

Jul 10, 2006
Post comments count 0
Post likes count 0

Before you can learn to recognize what's wrong, you must learn to recognize what's right

Raymond Chen

Sometimes, when I'm debugging a problem, I'll ignore a particular thread and somebody will ask, "What is that thread doing, and how did you know to ignore it?" My reply: "I have no idea what it's doing, but whatever it's doing, it's normal." Tess has been running an excellent series of posts on debugging the CLR, but one of the most important lessons is where you learn about things to ignore when debugging an ASP.NET hang. Hangs and deadlocks are tricky to debug because there is no unhandled exception that says, "Look at me, I'm a bug!" Instead, the program just grinds to a halt and you have to go spelunking...

Jul 7, 2006
Post comments count 0
Post likes count 0

Mr. T prefers a double-shot of espresso with two graham crackers, go figure

Raymond Chen

Back in November, Paul Davidson popped into his local Starbucks coffee shop and ended up in line right behind Mr. T. Unlike me, Mr. Davidson actually knew ahead of time what he was going to ask the former A-Team heavy. And the answer was worth waiting for. (Via TV Squad: Mr. T likes espresso, fool!) Mr. T has not disappeared from the scene entirely, however. TV Land announced [pdf] last September a new reality show starring the former A-Team heavy tentatively titled I Pity The Fool (capital "The" for some reason). More recent coverage.

Jul 7, 2006
Post comments count 0
Post likes count 0

No, really, why is it 160×31?

Raymond Chen

When I discussed some time ago why minimized windows have an apparent size of 160x31, I explained that the minimized icon is a miniature title bar, but I managed not to explain why the values are exactly 160 and 31. The width of the miniature title bar is determined by the member of structure. You can retrieve and change this structure with the help of the function. (Use the and flags, respectively.) Some people will mention the registry value, but those people are wrong. Notice, for example, that messing with requires a logoff cycle, whereas using takes effect immediately. That's because updates the i...

Jul 6, 2006
Post comments count 0
Post likes count 0

Nearly 20 percent of daily smokers say they exercise three or more times a week

Raymond Chen

Several months ago, The Seattle Times ran a story on people who smoke and also work out. In the article, personal trainer Will Baldyga compares it to other dissonant behavior such as pigging out on ice cream after a workout. I have to admit that on rare occasions, I lapse into such behavior ("justifying" bad eating habits with exercise), but on the whole, I manage to keep myself honest.