The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

May 28, 2009
Post comments count 0
Post likes count 1

I’m sorry, you don’t have permission to know where this shortcut file should show up in the Explorer window

Raymond Chen

Commenter Gabe suggested that the shortcut file should contain a bit that indicates whether the target of the shortcut is a folder, so that shortcuts to folders can sort with real folders. "That would allow them to sort properly without doing any additional work beyond that required to see its icon." (Commenter Josh agreed that "The performance reason doesn't really apply here, since explorer is already looking at the target to get the icon," rejecting commenter AndyC's argument that performance may have been a concern.) Well, first of all, shortcuts do remember whether the target is a file or a folder, or at...

May 27, 2009
Post comments count 0
Post likes count 1

Before designing and implementing around an assumption, it helps to check that your assumption is true

Raymond Chen

When your component depends on another component in the project, and that other component is missing features you need, you have a few ways of resolving the situation. Most people would recommend working with the people responsible for the other component during the project planning phase and coming to some sort of understanding about what you require from them and when they might be able to provide it, if at all. And then there's this approach. This imaginary email conversation takes place about halfway through a project: From: David Doe Hello, widget team. I'm David Doe, from the doodad team. Do widgets...

May 26, 2009
Post comments count 0
Post likes count 1

How to hide privacy violations in a privacy disclosure statement, part 2

Raymond Chen

It seems that nearly every privacy statement somebody sends me doesn't actually protect my privacy. They start out saying all sorts of great things, like Company X is committed to maintaining the privacy of its customers. After the section listing what information they collect, there's the section describing who they will disclose it to. We do not share non-public personal information with outside parties except as permitted by law... Oh, gee, thanks. Your policy is not to do anything illegal. And you need a privacy statement for this? Actually, it's worse, The full sentence goes like this: ...

May 26, 2009
Post comments count 0
Post likes count 1

What do you call a gadget that is used for debugging which looks at the properties of other gadgets?

Raymond Chen

Why, the Inspector Gadget, of course. Computer geeks think they're so clever.

May 25, 2009
Post comments count 0
Post likes count 0

The latest installment of Wallace and Gromit coming to Seattle

Raymond Chen

The Seattle International Film Festival is under way, and you get only one chance to see Wallace and Gromit: A Matter of Loaf and Death, featuring our favorite inventor/cheese-aficionado and his trusty sidekick on their latest animated adventure. Be there on Saturday morning, but please leave the Stinking Bishop at home.

May 25, 2009
Post comments count 0
Post likes count 1

Why can’t you change the alignment of an edit control after it has been created?

Raymond Chen

Commenter Kevin Eshbach asks why you cannot programatically change the text centering style of an edit control after the control has been created. The edit control is one of the original window manager controls, so it comes with a lot of history. First thing to note is that the message did not exist until Windows 95. The edit control predates Windows 95 by over a decade, so the short answer is "It can't respond to the change in styles because it doesn't even know that you changed them!" Back in the old days, the only time a control was informed of its styles was in the passed as parameters to th...

May 22, 2009
Post comments count 0
Post likes count 0

Chicken chicken chicken chicken

Raymond Chen

Chicken chicken chicken chicken. [pdf] Chicken: Chicken chicken chicken.

May 22, 2009
Post comments count 0
Post likes count 1

If an event is signaled more than once, are they delivered in the order in which they were signaled?

Raymond Chen

A customer asked the following question: Is it guaranteed that the events when signaled multiple times on an event object are delivered in the order in which they were signaled? For example, a thread is waiting on the event handle and performs some operation each time it is signaled. The ordering of those operations should be in the same order in which the event is signaled. Do events provide this guarantee? In case it matters, we're using an auto-reset event. We're finding issues when the system is under heavy load. This question is confusing because events don't "remember" who signaled them. When an ev...

May 21, 2009
Post comments count 0
Post likes count 1

First, try reading the error message: Episode 1

Raymond Chen

Quite some time ago, a customer had forgotten that they were using an evaluation edition of Windows, and they were awakened one morning with the following error message: The evaluation period for this installation of Windows has expired. This system will shut down in 1 hour. To restore access to this installation of Windows, please upgrade this installation using a licensed distribution of this product. The customer submitted an urgent request for assistance. "Please advise how we can get this machine working again. We need it to run a demo for a major client later this week." In the customer's panic, th...