The Old New Thing

See you in Building 109, Conference Room A

We saw some time ago that if somebody invites you to a meeting in Building 7, they are inviting you off campus to take a break from work. If somebody invites you to a meeting in Building 109, Conference Room A, they are inviting you to join them at the Azteca Mexican restaurant next door. Update: One of the members of the "...

In Windows, the directory is the application bundle

Aaargh! wonders why Windows doesn't just steal the concept of bundles from Apple and package up each application with all its libraries and everything else it needs into a single directory. This is such a great idea, it's been around since the early 1990's. It's just that Windows didn't give it a cute named like bundle. It just gave it the ...

How do I make a window remain visible even when the user selects Show Desktop?

A customer had this question: I'd like to know how to get a window to remain visible, even when the user has selected Show Desktop. Right now, when the user picks Show Desktop, the desktop appears and covers my window. Um, yeah, because that's the whole point of Show Desktop: To show the desktop and get rid of all those windows that are in ...

How do I create a right-aligned toolbar button?

I didn't think this was all that common a request, but it came in twice from two different customers, so I guess there are still people creating toolbars, and creating them with right-aligned buttons (even though it violates Windows user interface guidelines, though I can't find a citation right now). You may have noticed that the toolbar ...

How do I convert a UTF-8 string to UTF-16 while rejecting illegal sequences?

By default, when you ask to convert a UTF-8 string to UTF-16 that contains illegal sequences (such as overlong sequences), it will try to muddle through as best as it can. If you want it to treat illegal sequences as an error, pass the flag. The MSDN documentation on this subject is, to be honest, kind of hard to follow and even includes a...

Sufficiently advanced magic is indistinguishable from technology

An informal tradition in a former group was that whenever somebody bought a new car, we all went out to lunch to celebrate, but the person with the new car had to be one of the drivers. During one of our new-car trips, the proud owner of the new car showed off its fancy features. "Check this out, this car has a voice-controlled radio: Radio, ...

Generally speaking, if your function fails, you should return a failure code

A customer requested assistance with their shell namespace extension, and the request worked its way to me for resolution. The customer was at a loss because the customer's code was nowhere on the stack. What is wrong? The customer didn't provide a dump file or any other information beyond the stack trace. (Hint: When reporting a problem...