Should I be concerned that WaitForSingleObject is taking a large percentage...
A customer designed a client-server system where the client and the server ran on the same machine (but with different security contexts). They were doing some performance tests of the data transfer...
View ArticleGetting MS-DOS games to run on Windows 95: Too much EMM memory
A report arrived on an MS-DOS game that crashed when run on Windows 95. Mind you, the game ran for quite a while before finally keeling over. The repro steps were “Start the game, then go to City 1,...
View ArticleWhy can’t I pin a document to the taskbar?
Sven2 wonders why the taskbar won’t let you pin a batch file or a shortcut to a log file. The idea behind pinning an item to the taskbar is that it represents something that isn’t running on the...
View ArticleHow does Explorer calculate “Size on disk”?
When you ask to see the size of a file, you get two values. One is the nominal file size (the value that shows up in a directory listing). The other is something called “Size on disk”. What is “Size...
View ArticleIs there an API for redrawing a specific window from another application?
A customer had a Web-based full-screen application, and they wanted to write a companion application that did the following every second: FindWindow → InvalidateRect → UpdateWindow, or FindWindow →...
View ArticleWhat does QueryThreadCycleTime actually count?
A customer wanted some clarification on the QueryThreadCycleTime function. Based on the name, it suggests that it counts CPU cycles, but they observed that when the power profile is set to Balanced...
View ArticleStartup apps start up when I tell them
I remember some magazine article about Windows 8, and it talked about how fast Windows 8 started up compared to Windows 7. The way they measured it was by putting a shortcut to Notepad in the Startup...
View ArticleDoes Mulan speak Chinese?
One day, my daughter was at her pretend kitchen pretending to prepare a party for all the Disney princesses. (Yes, this was during her Disney princess phase.) The pretend phone pretend-rang, and she...
View ArticleGetting MS-DOS games to run on Windows 95: Not enough XMS handles
A report arrived on an MS-DOS game that crashed after you go through some preliminary game steps and then attempt a planetary landing. When you do this, the program blows up and starts corrupting...
View ArticleHow can I detect whether the user’s keyboard has a Break key?
Some time ago, a customer wanted to know whether there was a way to detect whether or not the user’s keyboard has a Break key. “Our program has a hotkey that involves the Break key. Nowadays, the...
View ArticleHow can I write an unkillable program, redux
A customer wanted to know how to write an unkillable process. Specifically, they want to write a program that runs continuously in the background, and they don’t want the logged-in used (who is not an...
View ArticleIs it okay to acquire an SRWLOCK recursively? (And why not?)
A customer was using an SRWLOCK to protect access to an object. All functions that use the object acquire the SRWLOCK in shared mode, and the function that destroys the object acquires the SRWLOCK in...
View ArticleTaking shortcuts when following driving instructions doesn’t always pay off
Many years ago, I had to pick up a package from the local UPS distribution center. This was back in the old days, before everybody had a GPS with turn-by-turn navigation. In the uphill-both-ways era,...
View ArticleHow can my CPU be running faster than the maximum speed?
A customer observed that according to Task Manager, their CPU was running faster than the maximum speed. How is that even possible? Utilization Speed 66% 2.90GHz Maximum speed: 2.50GHz Sockets: 1...
View ArticleWhat’s the difference between duplicating the handle to a token and...
If you have a token, there are two ways to get another handle to it. One is to use DuplicateHandle; the other is to use DuplicateToken (or DuplicateTokenEx). What’s the difference? Duplicating the...
View ArticleHow come a duplicated token doesn’t behave identically to the original?
A customer was experimenting with tokens and discovered that things fall apart when they have a thread impersonate itself. Shouldn’t that have no effect? Here’s what they discovered. Error checking...
View ArticleWhy am I being told that my message ID is too large?
A customer asked for help with an error message in the message compiler. Our message file goes like this: MessageIdTypedef=DWORD MessageId = 0x10001 SymbolicName = MSG_ERROR Language = English Error...
View ArticleIs Metro on fire today?
Two fires in one day in the Washington, DC Metro inspired a single-serving-site: ismetroonfiretoday.com. Answers the question on the tin. Bonus chatter: One of my friends told me that a few jobs ago,...
View ArticleWow, that article sounds an awful lot like something I would have writt… hey,...
A customer (via their custom liaison) had a question about the meaning of the lock overlay icon. Another colleague responded with a link to a site that contained an explanation. I read the linked...
View ArticleBut Australian Telecom loves it!
There are two popular ways of measuring how widespread a problem is: You can look at the number of times the problem occurs, and you can look at the number of users it happens to. Back in the late...
View Article