The contents of the Start page are not programmatically accessible
A customer wanted to know if is possible for an application to edit the user's Start page. No, there is no interface for editing the user's Start page or even knowing what is on it. The Start page is...
View ArticleWhy is the FAT driver called FASTFAT? Why would anybody ever write SLOWFAT?
Anon is interested in why the FAT driver is called FASTFAT.SYS. "Was there an earlier slower FAT driver? What could you possibly get so wrong with a FAT implementation that it needed to be chucked...
View ArticleThe case of the file that won't copy because of an Invalid Handle error message
A customer reported that they had a file that was "haunted" on their machine: Explorer was unable to copy the file. If you did a copy/paste, the copy dialog displayed an error. 1 Interrupted...
View ArticleApplying a filter to the contents of an Explorer Browser
Today's Little Program hosts an Explorer Browser but filters the contents to remove DLL files. You can, of course, substitute your own filter. (For example, maybe you want to show only files that...
View ArticleMicrospeak: Line of sight
I first encountered this term in a meeting I attended. Q: We would like to be able to reverse the polarity of the neutron flow without requiring a reboot. A: Yes, that is something we've been thinking...
View ArticlePassing the incorrect object type for a handle, how bad is it?
A customer asked a somewhat strange question: "We are calling SetEvent but passing the handle to a waitable timer. Application Verifier reports, "Incorrect object type for handle." But the code works...
View ArticleHow do I get a handle to the primary monitor?
There are various ways of getting a monitor. You can get the monitor from a point, from a rectangle, or from a window. But how do you get the primary monitor? The primary monitor is defined to be the...
View ArticleRaymond, why did you stop studying Chinese? It has no grammar!
One of my colleagues, a native Chinese speaker, asked me whether I was still learning Mandarin Chinese. I told him that I had given up. He was baffled by this. "But Chinese is such a simple language....
View ArticleWhy does an attempt to create a SysLink control in my plug-in sometimes fail?
A customer had written a plug-in for some application, and they found that their plug-in was unable to create a SysLink control via the CreateWindowExW function. The same code in a standalone...
View ArticleKicking around a function that formats stuff
Today's "Little Program" is really a "Little Puzzle" that got out of hand. This started out as a practical question: This code fragment screams out for some sort of simplification. (I've changed the...
View ArticleA little cheat in my Tiger Beat photo homage
One thing nobody has called out in my tribute to the Bill Gates Tiger Beat photo, either because it was too subtle or too obvious, is that the photo is actually a mirror image. The arrangement of...
View ArticleHow can I wait until all startup applications have finished launching?
A customer wanted to know how to detect that all startup applications have finished launching. They wanted to wait until everything settled down before proceeding with some task. What if two programs...
View ArticleWhen does GetTickCount consider the system to have started?
The GetTickCount and GetTickCount64 functions return "the number of milliseconds that have elapsed since the system was started." (The 32-bit version wraps around after around 50 days.) But when...
View ArticleHow to view the stack of a user-mode thread when its kernel stack has been...
Suppose you have a machine that has crashed, and your investigation shows that the reason is that there is a critical section that everybody is waiting for. While waiting for that critical section,...
View ArticleHow do I enumerate drives the same way that the NET USE command does?
If you use the Remote Desktop Connection client to connect to another computer, you have the option of making your local drives available to the remote computer. A customer wanted to know how to...
View ArticleFile version information does not appear in the property sheet for some files
A customer reported that file version information does not appear on the Details page of the property sheet which appears when you right-click the file and select Properties. They reported that the...
View ArticleDistinguishing between normative and positive statements to help people...
Often, we get questions from a customer that use the word should in an ambiguous way: Our program creates a widget whose flux capacitor should have reverse polarity. Attached is a sample program that...
View ArticleA library loaded via LOAD_LIBRARY_AS_DATAFILE (or similar flags) doesn't get...
If you load a library with the LOAD_LIBRARY_AS_DATAFILE flag, then it isn't really loaded in any normal sense. In fact, it's kept completely off the books. If you load a library with the...
View ArticleIs it wrong to call SHFileOperation from a service? Revised
My initial reaction to this question was to say, "I don't know if I'd call it wrong, but I'd call it highly inadvisable." I'd like to revise my guidance. It's flat-out wrong, at least in the case...
View ArticleThe crazy world of stripping diacritics
Today's Little Program strips diacritics from a Unicode string. Why? Hey, I said that Little Programs require little to no motivation. It might come in handy in a spam filter, since it was popular, at...
View Article