Showing results for October 2012 - Page 2 of 3 - The Old New Thing

Oct 18, 2012
0
0

Why does ShellExecute return SE_ERR_ACCESSDENIED for nearly everything?

Raymond Chen
Raymond Chen

We saw a while ago that the function returns at the slightest provocation. Why can't it return something more meaningful? The short-term answer is that the return value from is both a success code and an error code, and you check whether the value is greater than 32 to see which half you're in. In particular, the error code case is if the va...

History
Oct 17, 2012
0
0

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

Raymond Chen
Raymond Chen

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 characteri...

Other
Oct 16, 2012
0
0

Irony patrol: Recycling bins

Raymond Chen
Raymond Chen

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 in m...

History
Oct 15, 2012
0
0

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

Raymond Chen
Raymond Chen

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 your ...

History
Oct 11, 2012
0
0

Combo boxes have supported incremental searching for quite some time now

Raymond Chen
Raymond Chen

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 typing: "...

Code
Oct 10, 2012
0
0

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

Raymond Chen
Raymond Chen

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 folde...

Tips/Support
Oct 9, 2012
0
0

Usage guidance for a popcorn machine in the kitchenette

Raymond Chen
Raymond Chen

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 particular ...

Non-Computer
Oct 8, 2012
0
0

How does Explorer deal with recent files that were renamed?

Raymond Chen
Raymond Chen

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 exists,...

Other
Oct 5, 2012
0
0

How do I override the default icon selection algorithm?

Raymond Chen
Raymond Chen

The usual way of loading an icon from a resource is to use the or 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 window manager uses the current dis...

Code