Why was the replacement installer for recognized 16-bit installers itself a...
Even though 64-bit Windows does not support 16-bit applications, there is a special case for 16-bit installers for 32-bit applications. Windows detects this scenario and substitutes a 32-bit...
View ArticleWho is this rogue operative that filled my object with 0xDD, then sent me a...
A failure occurred during stress testing, and the component team came to the conclusion that their component was actually the victim of memory corruption and they asked for help trying to see if there...
View ArticleWhat is this inconsistent heap state that MSDN warns me about during...
In the MSDN documentation for the DllMain entry point, MSDN notes: When handling DLL_PROCESS_DETACH, a DLL should free resources such as heap memory only if the DLL is being unloaded dynamically (the...
View ArticleReading the word under the cursor via UI Automation
A while back, I showed how to use UI Automation to extract the text under the mouse cursor. Let's refine the program so it can extract the word under the cursor. The ability to extract subunits of...
View ArticleThe 2015/2016 Seattle Symphony subscription season at a glance
For many years, I've put together a little pocket guide to the Seattle Symphony subscription season for my symphony friends to help them decide which ticket package they want. For the past several...
View ArticleMicrospeak: Light up
In Microspeak, a feature lights up if it becomes available in an application when run on an operating system that supports it. The idea is that you write your application to run on, say, Windows...
View ArticleWhen asking about the capacity of a program, you also need to consider what...
An internal customer had a question about a tool, let's call it Program Q. As part of our gated checkin system, the system creates a new record in a Program Q table to record details of the checkin....
View ArticleWhat's the point of using a custom timer queue if there is a default one...
A customer observed that when you create a timer via CreateTimerQueueTimer, you have the option of passing either NULL to get the default timer queue or a handle to a custom timer queue created by...
View ArticleNon-capturing C++ lambdas can be converted to a pointer to function, but what...
First, let's look at how lambdas are implemented in C++. It is similar in flavor to the way lambdas are implemented in C#, but the details are all different. When the C++ compiler encounters a lambda...
View ArticleFurther adventures in trying to guess what encoding a file is in
The IsTextUnicode function tries to guess the encoding of a block of memory purporting to contain text, but it can only say "Looks like Unicode" or "Doesn't look like Unicode", and there some...
View ArticleNice job, you got an A minus from Bill
Bill Gates does not praise lightly. Some time ago, a colleague of mine helped to prepared a keynote address for Bill Gates. Afterward, he was informed that Bill rated the presentation an "A minus". My...
View ArticleWhy does the mouse cursor jump a few pixels if you click on the very bottom...
ABCDSchuetze discovered that if you click on the very bottom row of pixels of the taskbar, the mouse cursor jumps up a few pixels. Why is that? In order to take advantage of Fitts's Law, the...
View ArticleRegNotifyChangeKeyValue sucks less
One of the gotchas of the RegNotifyChangeKeyValue function is that the notification registration has thread affinity. This is a problem if you want the notification registration to outlive the...
View ArticleSolving the problem rather than answering the question: How can a...
A customer opened with a question, which the customer liaison forwarded to the product group with High Priority. (Because, apparently, their customer is more important than any other customer.) Our...
View ArticleConnecting some blocks: Tell me more about the current image in my wallpaper...
One of my colleagues said, I really like the wallpaper slide show feature, especially the one that rotates through the top-rated pictures in my photo library. My photo library includes photos taken by...
View ArticleSetting up a new computer often results in leftover slot covers, so what do...
When I joined Microsoft, I had a brand new computer waiting for me. One of the rites of passage for new employees is setting up their computer. A colleague helped me out with this effort, and one of...
View ArticleWhy are the dimensions of a maximized window larger than the monitor?
When you inspect the window rectangle of a maximized window, you might notice that its dimension are actually slightly larger than the screen. The upper left corner is something like (−8, −8) and the...
View ArticleModifying the CS_NOCLOSE style does affect all windows of the class, just not...
In a discussion of how not to disable the Close button, Rick C claims that changing the style does not affect windows that are already created. Actually, it does. You can't see it, but the effect is...
View ArticleA question about the FileTimeToLocalFileTime function turned out to be...
A customer reported that their program was running into problems with the FileTimeToLocalFileTime function. Specifically, they found that the values reported by the function varied wildly for...
View ArticleHow can I programmatically resize a listview column to fit its contents?
Sven wanted to know if there is a listview message to resize a column to fit its contents. Sure there is. In fact, the default Ctrl+Num+ handler uses that message. Take our scratch program and make...
View Article