Showing archive results for 2011

Oct 18, 2011
Post comments count0
Post likes count0

Seeing the world through arbitrage-colored glasses

Raymond Chen

On the mailing list with a negative service level agreement, one of my colleagues posted the message Free Nerf guns in my office. I've decided I'm no longer a collector. Not one to miss the opportunity to cause some trouble, another colleague posted the message Nerf guns for sale: $1 each. Get'em while they're hot. That earned a chuckle from...

Non-Computer
Oct 17, 2011
Post comments count0
Post likes count1

Why is there a CSIDL_DESKTOP value if you need the desktop in order to get it anyway?

Raymond Chen

John asks why there is a special constant defined for the desktop. After all, in order to use , you need to call and then bind to it. What's the point of having an that represents the desktop if, in order to use it, you first need to get the desktop? It's like asking why the file system uses (dot) to refer to the current directory. You're a...

Other
Oct 14, 2011
Post comments count0
Post likes count1

When your vice president tells you to stop replying to a mail thread, you probably should stop replying to the mail thread

Raymond Chen

Some time in the early part of this century, somebody sent a message to the Windows NT Development Announcements mailing list at Microsoft. It went something like, "My car was parked in «location X» and somebody ran into it and didn't leave a note. Does anybody have any information about this?" Now, one thing you need to know is t...

History
Oct 13, 2011
Post comments count0
Post likes count1

The question mark lets you make up anything you like

Raymond Chen

A trend I've noticed in journalism is to make some sort of outrageous statement, but then stick a question mark at the end to disavow any responsibility for the statement. By changing it to a question, you're avoiding actually having to back up what you write. "I'm not saying this is actually true. I'm just raising the question." For example, a he...

Non-Computer
Oct 13, 2011
Post comments count0
Post likes count1

How do I set an accessible name on an unlabeled control?

Raymond Chen

A customer asked for advice on accessibility. This was great news, because it meant that somebody actually cared about accessibility! We have a property sheet page that contains an unlabeled list view. The list view is not labeled because its meaning is implied by its placement on the dialog. This works great as long as you can see the screen, bu...

Code
Oct 12, 2011
Post comments count0
Post likes count1

Is there a 2048 character limit for OFN_ALLOWMULTISELECT in MFC or isn't there?

Raymond Chen

The MFC documentation for contains the following strange warning: When the user allocates their own buffer to accommodate , the buffer can't be larger than 2048 or else everything gets corrupted (2048 is the maximum size). The sudden informality of the phrase "or else everything gets corrupted" is surprising but also sounds vaguely familiar to...

Code
Oct 11, 2011
Post comments count0
Post likes count1

Microspeak: Bug jail

Raymond Chen

Bug jail is not a place where bugs are sent as punishment for their crimes. Rather, it's a (virtual) place that developers are sent when they have too many bugs. Project management establishes some maximum number of bugs (known as a bug cap) each developer is permitted to have on his or her plate, and developers whose bug count exceeds the specif...

OtherMicrospeak
Oct 11, 2011
Post comments count0
Post likes count1

Why does copying a file to my USB thumb drive say that the parameter is incorrect?

Raymond Chen

Consider the following sequence of operations, assuming that F: is a USB thumb drive with plenty of disk space. Why is the second file copy failing? The hint is the file extension: *.iso, which suggests that this is a CD or DVD image, and DVD images have the feature that they tend to be really big. Like more than 4GB big. USB thumb drives...

Tips/Support
Oct 10, 2011
Post comments count0
Post likes count1

How do I access a file without updating its last-access time?

Raymond Chen

The first problem with discussing file last-access time is agreeing what you mean by a file's last-access time. The file system folks have one definition of the file last-access time, namely the time the file was most recently opened and either read from or written to. This is the value retrieved by functions like , , and . The problem with th...

Code
Oct 7, 2011
Post comments count0
Post likes count1

During process termination, slim reader/writer locks are now also electrified

Raymond Chen

Some time ago I mentioned that during process termination, the gates are now electrified: If you attempt to enter a critical section that is owned by a thread that was terminated by an earlier phase of process termination, the entire process is forcibly terminated. Windows Vista introduced a new lightweight synchronization pseudo-object known as ...

Code