Showing archive results for 2012

Oct 8, 2012
Post comments count0
Post likes count1

How does Explorer deal with recent files that were renamed?

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
Post comments count0
Post likes count1

How do I override the default icon selection algorithm?

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
Oct 4, 2012
Post comments count0
Post likes count0

An unexpected application of negative numbers to gift-giving

Raymond Chen

A college classmate of mine informed me that one of his colleagues had planned his wedding so far in advance that on his negative-first anniversary (i.e., precisely one year before his anticipated wedding date), he gave paper to all of his friends. Said my classmate, "It's too bad that neither of us had been born on his −50th anniversary. ...

Non-Computer
Oct 4, 2012
Post comments count0
Post likes count1

Why does RegOpenKey sometimes (but not always) fail if I use two backslashes instead of one?

Raymond Chen

A customer reported that on Windows XP, they observed that their program would very rarely get the error when they passed two backslashes instead of one to the function: After removing C++ escapes, the resulting string passed to is The failure was very sporadic and not reproducible under controlled conditions. Well, first of all, d...

Code
Oct 3, 2012
Post comments count0
Post likes count1

How do I suppress the default animation that occurs when I hide or show a window?

Raymond Chen

A customer wanted to know how they can disable the default fade-in/fade-out animation that occurs when a window is hidden or shown. "I don't want to use because that causes my window to disappear from the taskbar. I tried but that affects the entire desktop and is too jarring. We want to suppress the effect because our program replaces one windo...

Code
Oct 2, 2012
Post comments count0
Post likes count1

Microspeak: Granular

Raymond Chen

Today's Microspeak word is granular. Here are some citations. Please bring your cost estimates at the granularity of 3, 5 or 10 days. The archive function archives all data older than the date specified. Is there a way to get the archive to be more granular than just a date? Our database covers multiple accounts, and we'd like to choose a diffe...

OtherMicrospeak
Oct 1, 2012
Post comments count0
Post likes count1

What's the difference between F5 and F8 at the boot screen?

Raymond Chen

Ian B wondered what the difference is between pressing F5 and F8 while Windows is booting. I have no idea either. My strategy was to just mash on the function keys, space bar, DEL key, anything else I can think of. Keep pressing them all through the boot process, and maybe a boot menu will show up. The F5 hotkey was introduced in Windows 95...

History
Sep 28, 2012
Post comments count0
Post likes count0

2012 Q3 link clearance: Microsoft research edition

Raymond Chen

My Q1 and Q3 link clearances are traditionally for links to other Microsoft bloggers, but this time I'm going to link to a few Microsoft research papers I found interesting. Why do Nigerian scammers say they're from Nigeria? Short answer: Because it ensures that the replies come only from the most gullible people on earth. Bonus chatter:...

Other
Sep 28, 2012
Post comments count0
Post likes count1

Data in crash dumps are not a matter of opinion

Raymond Chen

A customer reported a problem with the function. (Gosh, why couldn't they have reported a problem with a function with a shorter name! Now I have to type that thing over and over again.) We're having a problem with the function. We call it like this: On some but not all of our machines, our program crashes with the following call stack: ...

Other
Sep 27, 2012
Post comments count0
Post likes count1

The Ride to Rio: Bicycling from Los Angeles to Rio de Janeiro

Raymond Chen

An acquaintance of mine remarked that he sold his bicycle in Seattle a few months ago to some guy who explained, "I'm going to ride it to South America." "Okay," my acquaintance said, probably with some degree of skepticism. But it's a real project, and they head out soon! Ride to Rio: Four riders who "share a thirst for being stupid and finding...

Non-Computer