The Old New Thing

Wow, a task bar, what a novel idea

Some of my colleagues were struck by a sentence in this old Newsweek article about Microsoft's advertising campaign from last year. The sentence wasn't about the ad campaign, though. It was about Windows 7: The user interface has a slick new feature, a "taskbar" at the bottom that shows what apps you have open. The new system is due ...

Bug Bash: It's funny because it's true

Hans Bjordahl's Bug Bash is one of those it's funny because it's true comics about life inside a software company. Specifically, Microsoft, where Hans worked for many years and whose internal newsletter featured Hans's strip. (Some might argue that Bug Bash was the only part of the company newsletter worth reading.) Today I'm going to ...

As random as I wanna be: Why cmd.exe's %RANDOM% isn't so random

Somebody on my team reported that a particular script in our project's build process would fail with bizarre output maybe once in fifty tries. This script was run from a , and the result was a failed build. Rerunning make fixed the problem, but that's not much consolation when the build lab encounters it approximately every other day. The ...

Why can't AppLocale just be added to the Compatibility property sheet page?

Commenter DoesNotMatter wants to know why AppLocale cannot just be added to the Compatibility property sheet as a dropdown option. One of the things about having a huge topic backlog is that if I just wait long enough, there's a good chance somebody else will answer it, and then I don't have to write anything. And more often than not, that ...

What does the PRE in PREfast stand for?

Commenter Jeff asks what the PRE in PREfast stands for. It's an inside joke. The Microsoft Programmer Productivity Research Center (MSPPRC) originally produced a tool called PREfix. Michael Howard put me in touch with the development team, and they explained that it was called PREfix because it helps you fix your bugs before (PRE) you ...

Annotating function parameters and using PREfast to check them

Via the suggestion box, Sys64738 asks, whether I think is a good C/C++ programming style to add IN and OUT to function prototypes. Remember, this is my opinion. Your opinion may validly differ. I would go beyond just IN and OUT and step up to SAL annotations, which describe the semantics of function parameters in more detail than simply IN...

How do I indicate that I want my window to follow right-to-left layout rules?

There are many ways, depending on how wide a scope you want. If there is one specific window that you want to follow right-to-left layout rules, then you pass the extended window style when you create the window. This extended style is inherited by child windows, so once you set a top-level window to have right-to-left layout, all child ...