The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
A fork is an easy-to-find nonstandard USB device
Remember the Ten Immutable Laws of Security. Today, we're going to talk about number three: If a bad guy has unrestricted physical access to your computer, it's not your computer any more. There was a bug which floated past my field of vision many months ago that went something like this: "I found a critical security bug in the USB stack. If somebody plugs in a USB device which emits a specific type of malformed packet during a specific step in the protocol, then the USB driver crashes. This is a denial of service that should be accorded critical security status." Now, it's indeed the case that the driver shou...
What went wrong in Windows 95 if you use a system color brush as your background brush?
If you want to register a window class and use a system color as its background color, you set the member to the desired color, plus one, cast to an : Windows 95 introduced "system color brushes", which are a magic type of brush which always paint in the corresponding system color, even if the system color changes. The brush will always paint in the color corresponding to , even if the user changes the color scheme later. Now, you might be tempted to use a system color brush as your class background brush. After all, if you want the background to be the system window color, why not use a brush tha...
It's not surprising at all that people search for Yahoo
Earlier this year, one columnist was baffled as to why "Yahoo" was the most searched-for term on Google. I wasn't baffled at all. Back in 2001, Alexa published the top ten most searched-for terms on their service, and four of the top ten were URLs: yahoo.com, hotmail.com, aol.com, and ebay.com. A lot of people simply don't care to learn the difference between the search box and the address bar. "If I type what I want into this box here, I sometimes get a strange error message. But if I type it into that box there, then I get what I want. Therefore, I'll use that box there for everything." And you know what? It ...
Sometimes you need to recalibrate your progress reports
One of my former managers told me this story from a project he worked on many years ago. This project was broken up into multiple groups, and there was a weekly meeting where representatives from each group got together to discuss how the project was going. One of the groups was responsible for generating the reports and analysis. This was an important part of the project, but not a part that other groups depended on, since the reports were "pure output". At each meeting, the reporting and analysis group indicated steadily improving progress. Ten percent complete. Twenty-five percent. Fifty percent. The number i...
Placebo setting: QoS bandwidth reservation
A placebo setting that has been getting a lot of play in recent years is that of QoS bandwidth reservation. The setting in question sets a maximum amount of bandwidth that can be reserved for QoS. I guess one thing people forgot to notice is the word "maximum". It doesn't set the amount of reserved bandwidth, just the maximum. Changing the value will in most cases have no effect on your download speed, since the limit kicks in only if you have an application that uses QoS in the first place. QoS, which stands for "quality of service", is a priority scheme for network bandwidth. A program can request a certain ...
The quiet dream of placebo settings
Back in the Windows 95 days, people swore that increasing the value of in the file fixed application errors. People usually made up some pseudo-scientific explanation for why this fixed crashes. These explanations were complete rot. These breakpoints had nothing to do with Windows applications. They were used by 32-bit device drivers to communicate with code in MS-DOS boxes, typically the 16-bit driver they are trying to take over from or are otherwise coordinating their activities with. A bunch of these are allocated at system startup when drivers settle themselves in, and on occasion, a driver might pat...
What is the process by which the cursor gets set?
It's just <CODE>WM_SETCURSOR</CODE>, but that in itself is rather complicated.
Paradoxically, you should remove the smart card when logging on with a smart card
To connect to the Microsoft corporate network from home, employees need to use smartcard authentication. But, somewhat paradoxically, you do better if you remove the smart card. A colleague of mine tipped me off to this. To initiate the connection, you have to insert the smart card and provide the smart card password. Then the system connects to Microsoft and validates both the smart card and password. During this time, you can see the smart card access light blink on and off, and an "elapsed time" meter will start running. Once the elapsed time reaches five seconds, remove the smart card. The actual authentic...
It takes only one program to foul an upgrade
"Worst software ever." That was Aaron Zupancic's cousin's reaction to the fact that Windows XP was incompatible with one program originally designed for Windows 98. Then again, commenter Aargh! says "The bad code should be fixed, period. If it can't be fixed, it breaks, too bad." Perhaps Aargh! can send a message to Aaron's cousin saying, "Too bad." I'm sure that'll placate Aaron's cousin.