The Old New Thing

How to talk like Marketing: The awareness space

The great thing about Marketing is that you get to use words and phrases that normal human beings never use. Here's an example from over a decade ago: XYZ fit the installed base of web browsers we were targeting, and worked well in an awareness space. I have no idea what an "awareness space" is. The punch line? This sentence came from a ...

Why are there both TBSTYLE_EX_VERTICAL and CCS_VERT?

There are two ways to make a vertical toolbar. You can use the common style, or you can use the extended style which is specific to the toolbar. Why are there two ways of doing the same thing? Because we messed up. Whoever created the extended style didn't realize that there was already a perfectly good way of specifying a vertical ...

Passing by address versus passing by reference, a puzzle

Commenter Mike Petry asked via the Suggestion Box: Why can you dereference a COM interface pointer and pass it to a function with a Com interface reference. The call. The function called. I found some code written like this during a code review. It is wrong but it seems to work. You already know the answer to this question. You...

Excursions in composition: Adding rewind support to a sequential stream

Here's a problem "inspired by actual events": I have a sequential stream that is the response to a request I sent to a web site. The format of the stream is rather messy; it comes with a variable-length header that describes what type of data is being returned. I want to read that header and then hand the stream to an appropriate handler. ...

Excursions in composition: Sequential stream concatenation

As we've seen a few times already (when building context menus and exploring fiber-based enumeration), composition is an important concept in object-oriented programming. Today, we're going to compose two sequential streams by concatenation. There really isn't much to it. The idea is to take two streams and start by reading from the first...