Like a chicken talking to a duck
Many years ago, I called the home of my Chinese-speaking nieces. This was before they started learning English and before I started learning their dialect of Chinese. After the call was over, the...
View ArticleWhy don't the file timestamps on an extracted file match the ones stored in...
A customer liaison had the following question: My customer has ZIP files stored on a remote server being accessed from a machine running Windows Server 2003 and Internet Explorer Enhanced Security...
View ArticleYour program loads libraries by their short name and you don't even realize it
In the discussion of the problems that occur if you load the same DLL by both its short and long names, Xepol asserted that any program which loads a DLL by its short name "would have ONLY itself to...
View ArticleA function pointer cast is a bug waiting to happen
A customer reported an application compatibility bug in Windows. We have some code that manages a Win32 button control. During button creation, we subclass the window by calling SetWindowSubclass....
View ArticleSorting is a state and a verb (and a floor wax and a dessert topping)
Cliff Barbier points out that after you sort an Explorer view by name, new items are not inserted in their sorted position. This goes back to the question of whether sorting is a state or a verb. If...
View ArticleWhy is hybrid sleep off by default on laptops? (and how do I turn it on?)
Hybrid sleep is a type of sleep state that combines sleep and hibernate. When you put the computer into a hybrid sleep state, it writes out all its RAM to the hard drive (just like a hibernate), and...
View ArticleWhy double-null-terminated strings instead of an array of pointers to strings?
I mentioned this in passing in my description of the format of double-null-terminated strings, but I think it deserves calling out. Double-null-terminated strings may be difficult to create and...
View ArticleLooking at the world through kernel-colored glasses
During a discussion of the proper way of cancelling I/O, the question was raised as to whether it was safe to free the I/O buffer, close the event handle, and free the OVERLAPPED structure immediately...
View ArticleIf undecorated names are given in the DLL export table, why does link /dump...
If you run the link /dump /exports command on a DLL which exports only undecorated names, you may find that in addition to showing those undecorated names, it also shows the fully-decorated names....
View ArticleMultithreaded UI code may be just as hard as multithreaded non-UI code, but...
Commenter Tim Smith claims that the problems with multithreaded UI code are not significantly more than plain multithreaded code. While that may be true on a theoretical level, the situations are...
View ArticleWhy does Explorer show a thumbnail for my image that's different from the image?
A customer (via a customer liaison) reported that Explorer somestimes showed a thumbnail for an image file that didn't exactly match the image itself. I have an image that consists of a collage of...
View ArticleHow long do taskbar notification balloons appear on the screen?
We saw some time ago that taskbar notification balloons don't penalize you for being away from the computer. But how long does the balloon stay up when the user is there? Originally, the balloon...
View ArticleWatching the battle between Facebook and Facebook spammers
I am watching the continuing battle between Facebook and Facebook spammers with detached amusement. When I see a spam link posted to a friend's Facebook wall, I like to go and figure out how they got...
View ArticleWhy is my program terminating with exit code 3?
There is no standard for process exit codes. You can pass anything you want to ExitProcess, and that's what GetExitCodeProcess will give back. The kernel does no interpretation of the value. If...
View ArticleBeginBufferedPaint: It's not just for buffered painting any more
I covered the BeginBufferedPaint function in my 2008 PDC presentation, but one thing I didn't mention is that the buffered paint functions are very handy even if you have no intention of painting....
View ArticleOne engineer's interpretation of the Segway as a hybrid vehicle
In a discussion of commuting options (in which I was primarily an observer), the following exchange took place: A: I would rather get kicked in the shins every morning than bike up the massive hill...
View ArticleIf it's possible to do something, then it's possible to do something WRONG
Once you make it possible to do something, you have to accept that you also made it possible to do something wrong. When the window manager was originally designed, it made it possible for programs to...
View ArticleMicrospeak: PowerPoint Karaoke and the eye chart
The game PowerPoint-Karaoke was invented in 2006 by Zentrale Ingelligenz Agentur. In this game, contestants are called upon to give a PowerPoint presentation based on a slide deck they have never...
View ArticleWinMain is just the conventional name for the Win32 process entry point
WinMain is the conventional name for the user-provided entry point in a Win32 program. Just like in 16-bit Windows, where the complicated entry point requirements were converted by language-provided...
View ArticleHow do IsThemeActive, IsAppThemed, and IsCompositionActive differ?
There are three functions which test very similar things, and sometimes applications pick the wrong one. Here's the rundown: IsThemeActive checks whether visual styles are enabled for the user. This...
View Article