Showing archive results for 2012

Sep 5, 2012
Post comments count0
Post likes count1

How did the X-Mouse setting come to be?

Raymond Chen

Commenter HiTechHiTouch wants to know whether the "X-Mouse" feature went through the "every request starts at −100 points filter", and if so, how did it manage to gain 99 points? The X-Mouse feature is ancient and long predates the "−100 points" rule. It was added back in the days when a developer could add a random rogue feature bec...

History
Sep 4, 2012
Post comments count0
Post likes count1

Why don't the shortcuts I put in the CSIDL_COMMON_FAVORITES folder show up in the Favorites menu?

Raymond Chen

A customer created some shortcuts in the folder, expecting them to appear in the Favorites menu for all users. Instead, they appeared in the Favorites menu for no users. Why isn't working? The value was added at the same time as the other values, and its name strongly suggests that its relationship to is the same as the relationship between ...

Other
Sep 3, 2012
Post comments count0
Post likes count1

Buzzword-filled subject line easily misinterpreted by unsuspecting manager

Raymond Chen

A colleague of mine submitted some paperwork regarding the end-date of his college intern. The automated response combined HR buzzwords in an unfortunate way: Subject: Intern Termination Report was executed Just to be sure, my colleague stopped by his intern's office. He's still there. And still alive. For now.

Non-Computer
Aug 31, 2012
Post comments count0
Post likes count1

Adventures in undefined behavior: The premature downcast

Raymond Chen

A customer encountered the following problem: The function converts the cookie back to a object, and then checks if the object is a object by calling . If so, then it does some more stuff to figure out what type of paint to buy. (Note to nitpickers: The actual scenario was not like this, but I presented it this way to illustrate the point....

Code
Aug 30, 2012
Post comments count0
Post likes count1

I'm not calling a virtual function from my constructor or destructor, but I'm still getting a __purecall error

Raymond Chen

Some time ago, I described what is for: It's to detect the cases where you call a virtual method with no implementation (a so-called pure virtual method). This can happen during object constructor or destruction, since those are times when you can validly have a partially-implemented object. Well, there's another case this can happen: If the obj...

Code
Aug 29, 2012
Post comments count0
Post likes count1

Psychic debugging: Why Chinese characters don't work

Raymond Chen

Here's a walkthrough of an actual case of psychic debugging. I'm using the internal XYZ table-generating tool, but it appears to be useless in my case. Does this tool work? Right now, I'm just resorting to the manual method of generating my data table (Chinese and English). Hooray for vague questions! "It appears to be useless." But there were ...

Other
Aug 28, 2012
Post comments count0
Post likes count1

Command line tool to manage Windows 7 Libraries, with source code

Raymond Chen

A customer asked if there was a command-line tool for managing Windows 7 Libraries so that they could create and deploy libraries across their organization. Not only is there such a tool, it even comes with source code. The Shell Library Command Line Sample shows how to manage Windows 7 libraries programmatically via the interface....

CodeTips/Support
Aug 28, 2012
Post comments count0
Post likes count1

Well at least nobody's parking there any more

Raymond Chen

There is a field next to the Microsoft building I used to work in, and for a time, people parked their cars out on the field, presumably because finding a proper parking space in the garage became difficult due to overcrowding. To prevent people from parking in the field, Security placed a large log across the access to the field. The technique wor...

Non-Computer
Aug 27, 2012
Post comments count0
Post likes count1

How does the taskbar decide whether to show Recent or Frequent documents on the jump list?

Raymond Chen

Some jump lists show Recent documents, and others show Frequent documents. (Images stolen from Sasha Goldshtein.) Our friend xpclient wanted to know how the taskbar decides which one to use, because it seemed random. (Ironically, xpclient is asking a question about the Window 7 client.) The default is to show Recent documents. But an appl...

Tips/Support
Aug 24, 2012
Post comments count0
Post likes count1

Dumping a hash table with external chaining from the debugger

Raymond Chen

I was doing some crash dump debugging, as I am often called upon to do, and one of the data structure I had to grovel through was something that operated basically like an atom table, so that's what I'll call it. Like an atom table, it manages a collection of strings. You can add a string to the table (getting a unique value back, which we will ca...

Other