The x86 architecture is the weirdo: Structured exception handling
If your reference architecture is x86, then you will think that everything it does is normal and the rest of the world is weird. Except it’s the other way around: The x86 architecture is the weirdo. I...
View ArticleDoes this operation work when file system redirection is disabled? The...
A customer reported that when their program called SHGetFileInfo to get the icon for a folder, the call failed. “It works on some machines but not others. We don’t know what the difference is...
View ArticleWhen will GetMessage return -1?
A source of great consternation is the mysterious -1 return value from GetMessage: If there is an error, the return value is −1. For example, the function fails if hWnd is an invalid window handle or...
View ArticleUsing accessibility to monitor windows as they come and go
Today’s Little Program monitors windows as they come and go. When people contemplate doing this, they come up with ideas like installing a WH_CBT hook or a WH_SHELL hook, but one of the major problems...
View ArticleDreaming about a rather unusual guitar rehearsal
I dreamed that I watched a long-time colleague of mine rehearse the guitar in preparation for the new “hot pants” competition of the Miss Universe pageant. The scary thing is that the pageant may...
View ArticleThere’s no law that says two people can’t have the same thing to eat
Some time ago, my group went out for a team lunch. It was to a restaurant we were not familiar with, so there was quite a bit of time studying the menu. As everybody looked over the menu, discussion...
View Article“Adjust visual effects for best performance” should really be called “Adjust...
In the Performance Options control panel, on the tab labeled Visual Effects, there is a radio button called Adjust for best performance. If you select it, then all the visual effects are disabled. But...
View ArticleThe C language specification describes an abstract computer, not a real one
If a null pointer is zero, how do you access the memory whose address is zero? And if C allows you to take the address one past the end of an array, how do you make an array that ends at 0xFFFFFFFF,...
View ArticleHow do I convert a method name to a method index for the purpose of...
The IMessageFilter::HandleIncomingCall method describes the incoming call by means of an INTERFACEINFO structure: typedef struct tagINTERFACEINFO { LPUNKNOWN pUnk; IID iid; WORD wMethod; }...
View Article2013 Q1 link clearance: Microsoft blogger edition
It’s that time again: Linking to other Microsoft bloggers. How much personalization is the right amount? A lesson in dynamic range. Everyone quotes command line arguments the wrong way, a companion to...
View Article