The compatibility constraints of error codes, episode 2
A customer reported an incompatibility in Windows 7: If A: is a floppy drive and they call LoadLibrary("A:\\foo.dll") and there is no disk in the drive, the LoadLibrary call fails with the error...
View ArticleThe story of the mysterious WINA20.386 file
matushorvath was curious about the WINA20.386 file that came with some versions of MS-DOS. The WINA20.386 file predates my involvement, but I was able to find some information on the Internet that...
View ArticleMicrospeak: fit
In Microspeak, fit is a predicate noun which is never used on its own but always comes with a modifying adjective. For something to be a good fit is for something to be appropriate or suitable for a...
View ArticleThe path-searching algorithm is not a backtracking algorithm
Suppose your PATH environment variable looks like this: C:\dir1;\\server\share;C:\dir2 Suppose that you call LoadLibrary("foo.dll") intending to load the library at C:\dir2\foo.dll. If the network...
View ArticleWhat is the effect of memory-mapped file access on GetLastError()?
A customer was using memory-mapped files and was looking for information as to whether access to the memory-mapped data modifies the value returned by GetLastError. A member of the kernel team...
View ArticleFancy use of exception handling in FormatMessage leads to repeated...
Every so often, somebody "discovers" an alleged security vulnerability in the FormatMessage function. You can try it yourself: #include <windows.h> #include <stdio.h> char buf[2048]; char...
View ArticleWhy did the Windows 95 Start button have a secret shortcut for closing it?
Windows 95 had a strange feature where, if you put focus on the Start button and then hit Alt+- (That's Alt and the hyphen key), you got a system menu for the Start button which let you close it, and...
View ArticleThe awesome Valentine's Day gift disguised as an uncreative one
A few years ago, one of my colleagues wanted to surprise his wife with a new laptop for Valentine's Day. (As a bonus, he set the wallpaper to one of their wedding pictures.) Now, he could just give...
View ArticleWhen does an icon handler shell extension get unloaded?
A customer had a question about the SHGetFileInfo function. They used the function to obtain the icon for a file, and they discovered that when they asked for the icon of a particular type of file,...
View ArticleWhy does the DrawIcon function draw at the default icon size?
Miral wondered why the DrawIcon function draws at the default icon size instead of respecting the actual icon size. After all, if you loaded a nonstandard-sized icon via LoadImage, then presumably...
View ArticleHow do I find out which process has a file open?
Classically, there was no way to find out which process has a file open. A file object has a reference count, and when the reference count drops to zero, the file is closed. But there's nobody keeping...
View ArticleWhat's the difference between Text Document, Text Document - MS-DOS Format,...
Alasdair King asks why Wordpad has three formats, Text Document, Text Document - MS-DOS Format, and Unicode Text Document. "Isn't at least one redundant?" Recall that in Windows, three code pages have...
View ArticleWhy don't music files show up in my Recent Items list?
If you double-click a music file, it doesn't show up in your Recent Items list. What's so special about music files? The technical reason is that the file types are registered with the...
View ArticleInstead of creating something and then trying to hide it, simply don't create...
A customer had a question, which was sort of I bet somebody got a really nice bonus for that feature in reverse. A customer is asking if there is a way to programmatically control the icons in the...
View ArticleWhat does the minus sign in indirect localized string resources mean?
The syntax for indirect localized string resources is @filename,-stringId, optionally followed by a semicolon and a comment. A customer wanted to know what the minus signs stands for. The minus sign...
View ArticleWhy does Windows keeps showing the old indirect strings even after I update...
If your application uses indirect localized string resources, and you update the application, you may find that Windows keeps using the old string from the previous version of the application. For...
View ArticleWhy was HDS_FILTERBAR added to the common controls if nobody uses it?
Mike Dunn was curious about the intended purpose of HDS_FILTERBAR. The HDS_FILTERBAR style adds a row below the header control consisting of an edit control and a funnel icon. The funnel icon...
View ArticleHow can I customize which notification icons are displayed by default on a...
Windows 7 provides a new Unattended Windows Setup setting known as NotificationArea. This setting lets you replace the default Action Center and Battery icons with two icons of your choosing. To...
View ArticleWhat was the nature of the feedback that resulted in the change to the...
Gabe wanted to know the nature of the feedback that resulted in the change to Explorer navigation pane. Historically, Explorer had a navigation pane that contained a folder tree, and the navigation...
View ArticleHow do I make it so that users can copy static text on a dialog box to the...
Given that you have a Win32 dialog box with static text in an LTEXT control, how do you make it so that users can easily copy that text to the clipboard? The traditional solution is to create a...
View Article