The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

You'd think questions about underwear were understood to be off-limits
May 31, 2007
Post comments count 0
Post likes count 0

You'd think questions about underwear were understood to be off-limits

Raymond Chen
Raymond Chen

Strange what sorts of things need to be spelled out explicitly nowadays. You know you're in trouble when your employee training includes a discussion of company policy regarding employees making inappropriate comments or questions about underwear.

Visual C++ 2005 will generate manifests for you
May 31, 2007
Post comments count 0
Post likes count 0

Visual C++ 2005 will generate manifests for you

Raymond Chen
Raymond Chen

New in Visual C++ 2005 is the ability to specify a manifest dependency via a directive. This greatly simplifies using version 6 of the shell common controls. You just have to drop the line into your program and the linker will do the rest. Note that the processor architecture is hard-coded into the above directive, which means that if you are targetting x64, you'll get the wrong manifest. To fix that, we need to do some preprocessor munging. Update: I didn't know that * is allowed here to indicate "all architectures". That simplifies matters greatly. Nitpicker's corner * That wasn't a footnote...

The three things you need to know about tsunamis
May 30, 2007
Post comments count 0
Post likes count 0

The three things you need to know about tsunamis

Raymond Chen
Raymond Chen

One of my friends is involved with Science on Tap, a free, informal monthly get-together in the Seattle area covering science topics for the general public. (Recent coverage in the Seattle-PI.) The topic for July 30th is "The three things you need to know about tsunamis", and a title like that pretty much sells itself.

The sad predicament of the unempowered manager
May 30, 2007
Post comments count 0
Post likes count 0

The sad predicament of the unempowered manager

Raymond Chen
Raymond Chen

I just made up that term now because I needed a word to describe the situation where some manager is put in charge of a feature but is not given a staff to implement that feature. This happens more often than you might think, since there are many features that are "horizontal", i.e., features which affect all teams throughout the project. So-called taxes often fall into this category, such as power management, accessibility, and multiple monitors. (Larry Osterman calls them *bilities. I call them taxes.) The unempowered manager is in a predicament, having been assigned a task without a staff to accomplish it. Al...

Let's talk like people
May 29, 2007
Post comments count 0
Post likes count 0

Let's talk like people

Raymond Chen
Raymond Chen

On Mark Rosenfelder's Zompist web site I found a series of cultural guides named How to tell if you're ‹nationality›. All of the entries are simultaneously funny and insightful, such as this one from Turkey: A company can fire just about anybody it wants. But it will also hire anybody. For some reason, my favorite is this one from the Polish entry: When you negotiate, you are polite, of course, but it's only good business to 'play hardball'. You don't say what you mean, you pretend not to know many things, but you surely never lie. You know the other side does the same thing, and they know yo...

Psychic debugging: Why does FormatMessage say the resource couldn't be found?
May 29, 2007
Post comments count 0
Post likes count 0

Psychic debugging: Why does FormatMessage say the resource couldn't be found?

Raymond Chen
Raymond Chen

Solving this next problem should be a snap with your nascent psychic powers: I'm trying use to load a resource string with one insertion in it, and this doesn't work for some reason. The string is "Blah blah blah %1. Blah blah blah." The call to fails, and returns . What am I doing wrong? Hint: Take a closer look at the parameter . Hint 2: What does "" tell you? Resource identifiers that begin with "" are typically string resource identifiers, not message resource identifiers. There is no strong consensus on the naming convention for message resource identifiers, although I've seen "". Part of t...

Cool, they're using Roman numerals!
May 28, 2007
Post comments count 0
Post likes count 0

Cool, they're using Roman numerals!

Raymond Chen
Raymond Chen

The IT department here will periodically send out notifications regarding changes to the network infrastructure or updates that are being deployed across the company. One of my colleagues sent me email saying, "Cool, they're using Roman numerals!" It was in response to one particular IT notification that included the following sentence: This update will require approximately X minutes.

Raymond's SIFF schedule (2007)
May 25, 2007
Post comments count 0
Post likes count 0

Raymond's SIFF schedule (2007)

Raymond Chen
Raymond Chen

Nobody asked, but I'm going to post it anyway. These are the movies I'm planning on seeing, along with my twisted take on the plot, based solely on the movie description. ¹These movies were chosen in large part to serve as German lessons. ²I have a weak spot for slightly off-kilter Japanese movies set in the modern day. ³Swedish class group movie. Even though it's in Danish. Since Outsourced is sold out, I'll have to find another movie to replace it. Possibilities include French for Beginners, Mushihi, The Three Musketeers (animated), and Eagle vs. Shark.

The parameters to PostQueuedCompletionStatus are not interpreted
May 25, 2007
Post comments count 0
Post likes count 0

The parameters to PostQueuedCompletionStatus are not interpreted

Raymond Chen
Raymond Chen

Larry Osterman mentioned this almost in passing quite a while ago, that the parameters to are not interpreted by the operating system. Well, obviously the first parameter, the handle to the completion port, is interpreted as the handle to the completion port. But the other parameters, , , and are not interpreted at all. Even though they have names, the names don't mean anything. Whatever values you pass for those three parameters merely pop out of when the notification packet makes it to the head of the queue. Why do the parameters have names if the names don't mean anything? Because the operating system i...