The Old New Thing

Why does ShellExecute return SE_ERR_ACCESSDENIED for nearly everything?

We saw a while ago that the Shell­Execute function returns SE_ERR_ACCESS­DENIED at the slightest provocation. Why can't it return something more meaningful? The short-term answer is that the return value from Shell­Execute is both a success code and an error code, and you check whether the value is greater than 32 to see which ...

If there's a problem with a wiki, then you can fix it; that's why it's a wiki

On an internal mailing list, somebody asked a question about how to do X with Y, and I replied with a link to an internal wiki that described how to do X with Y (answer: use the Z tool). Somebody else replied, "Time to update that article because the link to the Z tool is broken." Apparently, this person forgot that one of the defining ...

Irony patrol: Recycling bins

Microsoft has a large corporate recycling effort. Every office, every mail room, every kitchenette, every conference room has a recycling bin. The dining facilities earned Green Restaurant Certification, and there is a goal of making the cafeterias a zero-landfill facility by 2012. (Hey, that's this year!) A few years ago, I found one room...

The cries of "Oh no!" emerge from each office as the realization slowly dawns

Today is the (approximate) 15th anniversary of the Bedlam Incident. To commemorate that event, here's a story of another email incident gone horribly awry. Some time ago, an email message was sent to a large mailing list. It came from somebody in the IT department and said roughly, "This is a mail sent on behalf of Person X to check if ...

What happens if you forget to pass an OVERLAPPED structure on an asynchronous handle?

A customer noticed that they were accidentally issuing some I/O's against an overlapped handle without using an OVERLAPPED structure. The calls seemed to work, and the program did not appear to suffer any ill effects, but they were worried that they just being lucky and that eventually the error will come back to bite them. So what really ...
Comments are closed.0 0
Code

Combo boxes have supported incremental searching for quite some time now

Back in August 2007, I promised to post a program the following day but it appears that I never did. Oops. I discovered this as I went through my "things to blog about" pile and figured better late than never. Though five years late is pretty bad. Here's a program which fills a combo box with some strings. Run this program and start ...
Comments are closed.0 0
Code

Why does Windows Compressed Folders (Zip folders) reject paths that begin with a slash?

A customer asked, "Does NTFS support files with a null string as the name?" No, NTFS does not support files with no name. None of the commonly-used Windows file systems do. Files must have a name. But what a strange question that is. The customer was kind enough to explain why they cared. "We have a zip file that the Compressed Folders (Zip ...

Usage guidance for a popcorn machine in the kitchenette

My colleague KC Lemson tipped me off to a sign hanging next to a popcorn machine in one of the kitchens: A friend of mine happened to have a chat with a fire fighter who used to be assigned to the fire station nearest to Microsoft main campus. According to him, the top three reasons for being called to a Microsoft building are (in no ...

How does Explorer deal with recent files that were renamed?

Roni wonders how Explorer manages to keep track of files that were moved or renamed. Specifically, "opening a shortcut to a renamed file actually updates the shortcut's destination and opens the renamed file. How is this done? Is it an NTFS feature?" This feature has been around since Windows 95. If the target of a shortcut no longer ...

How do I override the default icon selection algorithm?

The usual way of loading an icon from a resource is to use the Load­Icon or Load­Image function and letting the window manager's icon selection algorithm decide which image to use based on the images available in the icon, the desired icon size, and the current color depth. A customer wanted to override that algorithm, because the ...
Comments are closed.0 0
Code

Feedback usabilla icon