The Old New Thing

Why chicken wings dominate Super Bowl snack time

This upcoming Sunday is the biggest sports day of the year in the United States: The championship game for the professional American Football league. The entire country grinds to a halt. The most famous secondary effect of the game is the commercials. So many people watch the game that television advertisement costs are the highest for the ...

Non-psychic debugging: If somebody's complaining that a collection should be empty but isn't, you might want to see what's in there

A programmer on the GHI team (yes, the same GHI team) reported that they were hitting an assertion failure using an internal library and asked for help debugging it. "Can somebody help me figure out which factory it is that did not get unregistered?" I didn't work on this internal library, but on the other hand I'm not afraid to look ...
Comments are closed.0 0
Code

Can process IDs be greater than 64000? Because we're seeing process IDs greater than 64000

A customer asked what to me was a very strange question. Can process IDs be greater than 64000? Because we're seeing process IDs greater than 64000. This is a strange question because the answer is right there: You're seeing process IDs greater than 64000 with your very own eyes. Do you doubt the evidence right there in front of you? It...
Comments are closed.0 0
Code

One of my favorite error codes: Optional parameter missing

The error Optional parameter missing sounds awfully paradoxical, doesn't it. I mean, if the parameter is optional, why are you complaining that it's missing? This KB article explains why, specifically, the part that says, "If a parameter is omitted, the calling program must…". For those who don't want to click through, here's the ...
Comments are closed.0 0
Code

Why does my setup program detect the operating system incorrectly the second time I run it?

A customer reported that when their application called the function, it sometimes reported incorrect values. Specifically, the logs collected from clients shows that the first time the program was run on a Windows 7 machine, the operating system was correctly reported as 6.1.7600 (Windows 7), but the second time it was run, the ...

How can I make a callback function a member of my C++ class?

Instead of a Little Program today, I'm going to answer a Little Question. This is a common beginner question, but I figure I'll just spell it out right here for posterity. First of all, you probably noticed that you can't do this: That's because the is declared as a so-called free function, but member functions are not free. Neither are...
Comments are closed.0 0
Code

Non-psychic debugging: Looking for leaked objects by their vtable

A programmer on the GHI team reported that they were hitting an assertion failure using an internal library and asked for help debugging it. I didn't work on this internal library, but on the other hand I'm also not afraid to look inside and around. The assertion failure said, "Assertion failed: All widgets from a factory must be ...
Comments are closed.0 0
Code

The Visual Effects dialog box just tells you what you want to hear

The Visual Effects dialog box has three options, "Let Windows choose what's best for my computer," "Adjust for best appearance," and "Adjust for crappiest appearance best performance." Some people have discovered the registry key where the Visual Effects dialog box remembers which radio button was most recently checked, but they found that ...