The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Pidls and monikers do roughly the same thing, just backwards
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...
News flash: Big houses have bigger heating bills
Big houses have bigger heating bills. Thanks, Associated Press! I learn something new every day. (Previous amazing fact.)
Not everybody with a non-Windows partition type is a geek
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...
Wenn Ausländer Deutsch phonetisch singen
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 ...
Before you can learn to recognize what's wrong, you must learn to recognize what's right
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...
Mr. T prefers a double-shot of espresso with two graham crackers, go figure
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.
No, really, why is it 160×31?
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...
Nearly 20 percent of daily smokers say they exercise three or more times a week
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.
Is the maximum size of the environment 32K or 64K?
There appears to be some confusion over whether the maximum size of the environment is 32K or 64K. Which is it? Both. The limit is 32,767 Unicode characters, which equals 65,534 bytes. Call it 32K or 64K as you wish, but make sure you include the units in your statement if it isn't clear from context.