The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts

Management-speak: Norming around mechanisms

This is the entire text of an actual piece of email I received from a high-level manager in response to some feedback I sent. Thanks. There is a lot of norming around any of these mechanisms as well as a certain amount of ability to hold ones ground in these interactions in addition to the admin of the rule being good enough as discussed. Bob (not the manager's actual name) I've heard rumors that this message was written in English, but I'm not convinced.

'Tis the season for top ten lists, and manipulation of top ten lists

A few years ago, Marketplace radio reported on the sub-industry of top ten lists, specifically the lists intended to be used as gift guides. Marketing companies drool over these lists, since placement on them can mean a tremendous boost in sales, and they're anxious to do whatever it takes to get on the list. For example, The Da Vinci Code was a relatively unknown title until the American Booksellers Assocation placed it on their own "best picks" list. In the story, c|net comes off looking good, standing their ethical ground against marketers looking for an endorsement. The Today Show doesn't fare as well. On...

Consequences of the scheduling algorithm: Low priority threads can take 100% CPU

I see variations on this question occasionally. "Why is my low priority thread consuming 100% CPU?" Setting a thread to low priority doesn't mean that it won't consume lots of CPU. It just means that it doesn't get to run as long as there is a higher-priority thread ready to run. But if there is a CPU looking for something to do, and there is no higher-priority thread that is runnable, your low-priority thread will run, and if your low-priority thread is CPU-intensive, it will get all the CPU. Priority merely controls which threads get first dibs on CPU time, but if you arrange so that your thread is the only o...

How do I mark a shortcut file as requiring elevation?

Specifying whether elevation is required is typically something that is the responsibility of the program. This is done by adding a element to your manifest. (Bart De Smet shows you how. Calvin Hsia does the same for your Visual FoxPro programs.) But if the program you're running doesn't have such a manifest—maybe it's an old program that you don't have any control over—you can create a shortcut to the program and mark the shortcut as requiring elevation. To do this, you set the flag in the shortcut attributes. Here's a skeleton program that sets the flag on the shortcut whose path is passed on...

Book review: Advanced Windows Debugging (Mario Hewardt and Daniel Pravat)

Ever so often, somebody sends me a book, and most of the time I glance through it and say, "Eh." But not this time. Advanced Windows Debugging will make you the envy of your friends (if your friends are computer nerds). Even the section with the "Oh come on every moron knows this already" title Basic Debugger Tasks has stuff that I didn't know. Fortunately, you don't have to slog through the stuff you already do know in order to find it, because the nifty new debugger commands are set off in the snippets of debugger conversation. (And by debugger conversation, I mean output of a debugger based on the Windows d...

Not every first-chance exception is a security vulnerability

In the category of dubious vulnerability, I submit the following (paraphrased) report: If I call the function, I can cause a buffer overflow exception if I provide an insertion that is more than 2000 characters long. The function in Windows NT, 2000 and XP used the dynamically expanding buffer technique to allocate memory for the resulting message. If the resulting string was more than one page in length (4KB on an x86 system), there was an exception thrown when the function tried to write to the 4096th byte of the buffer. This looks like a buffer overflow, and in a sense it is, but it's a contro...

Wall Street bonus season's trickle-down

Marketplace covers the businesses who are indirect beneficiaries of the Wall Street bonus season. Ted Fisher, who sells custom-tailored clothing, sees 35 to 40% of his business come in during the three months of bonus season. I suspect business near Redmond are similarly affected by Microsoft review season, though perhaps not as much now as before.

How did wildcards work in MS-DOS?

Life was simpler but looked more complicated.

Unwittingly enveloped in the Santarchy

Last Saturday, my friends and I were heading for a subway station in Brooklyn and found ourselves behind a man and a woman both dressed in Santa Claus outfits. They were kind enough to wave us onto the train with a "hurry, hurry!", and we made it on board just as the subway doors closed. And then we discovered that we were on a subway train filled with people dressed as Santa Claus, noisy but well-behaved. What parallel universe had we mistakenly stepped into? Was there some subway dress code announcement we had missed? Nope. The announcement we missed was for the 2007 New York City SantaCon. (Here they are sw...