Wait, you never said that I had to initialize the object before I used it!
A customer reported that they were having trouble creating slim reader/writer locks at runtime. They simplified the issue to a short program: #include <windows.h> #include <iostream> using...
View ArticleDumping a hash table with external chaining from the debugger
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...
View ArticleHow does the taskbar decide whether to show Recent or Frequent documents on...
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...
View ArticleWell at least nobody's parking there any more
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...
View ArticleCommand line tool to manage Windows 7 Libraries, with source code
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...
View ArticlePsychic debugging: Why Chinese characters don't work
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...
View ArticleI'm not calling a virtual function from my constructor or destructor, but I'm...
Some time ago, I described what __purecall 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...
View ArticleAdventures in undefined behavior: The premature downcast
A customer encountered the following problem: class Shape { public: virtual bool Is2D() { return false; } }; class Shape2D : public Shape { public: virtual bool Is2D() { return true; } }; Shape...
View ArticleBuzzword-filled subject line easily misinterpreted by unsuspecting manager
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...
View ArticleWhy don't the shortcuts I put in the CSIDL_COMMON_FAVORITES folder show up in...
A customer created some shortcuts in the CSIDL_COMMON_FAVORITES folder, expecting them to appear in the Favorites menu for all users. Instead, they appeared in the Favorites menu for no users. Why...
View ArticleHow did the X-Mouse setting come to be?
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...
View ArticleYou can't rule out a total breakdown of normal functioning, because a total...
A customer was attempting to study a problem that their analysis traced back to the malloc function returning NULL. Is it a valid conclusion that there is no heap corruption? While heap corruption may...
View ArticleThe case of the asynchronous copy and delete
A customer reported some strange behavior in the CopyFile and DeleteFile functions. They were able to reduce the problem to a simple test program, which went like this (pseudocode): // assume "a" is...
View ArticleWhen you transfer control across stack frames, all the frames in between need...
Chris Hill suggests discussing the use of structured exception handling as it relates to the window manager, and specifically the implications for applications which raise exceptions from a callback....
View ArticleWhy can't I use Magnifier in Full Screen or Lens mode?
A customer liaison asked why their customer's Windows 7 machines could run Magnifier only in Docked mode. Full Screen and Lens mode were disabled. The customer liaison was unable to reproduce the...
View ArticleOne for the "They have to say that because of me": Ground rules at the Point...
The ground rules for the Point Defiance Zoo and Aquarium in Tacoma include the usual things you might expect. "No pets." "Do not feed the animals." "No smoking." But then there's a rule that clearly...
View ArticleRogue feature: Docking a folder at the edge of the screen
Starting in Windows 2000 and continuing through Windows Vista, you could drag a folder out of Explorer and slam it into the edge of the screen. When you let go, it docked itself to that edge of the...
View ArticleWM_CTLCOLOR vs GetFileVersionInfoSize: Just because somebody else screwed up...
In a discussion of the now-vestigial lpdwHandle parameter to the GetFileVersionInfoSize function, Neil asks, "Weren't there sufficient API differences (e.g. WM_CTLCOLOR) between Win16 and Win32 to...
View ArticleIShellFolder::BindToObject is a high-traffic method; don't do any heavy lifting
A customer observed that once the user visited their shell extension, Explorer ran really slowly. (Actually, it took a while just to get to this point, but I'll skip the early investigations because...
View ArticleRaymond learns about some of the things people do to get banned on Xbox LIVE
I still enjoy dropping in on Why Was I Banned? every so often, but not being a l33t Xbox haxxor, I don't understand a lot of the terminology. Fortunately, some of my colleagues were kind enough to...
View Article