The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Why does it take Task Manager longer to appear when you start it from the Ctrl+Alt+Del dialog?
Amit was curious why it takes longer for Task Manager to appear when you start it from the Ctrl+Alt+Del dialog compared to launching it from the taskbar. Well, you can see the reason right there on the screen: You're launching it the long way around. If you launch Task Manager from the taskbar, Explorer just launches via the usual mechanism, and Task Manager launches under the same credentials on the same desktop. On the other hand, when you use the secure attention sequence, the program receives the notification, switches to the secure desktop, and displays the Ctrl+Alt+Del dialog. When you select Task M...
Does mapping the same shared memory two times in a process lead to double the address space usage?
A customer designed a system which uses shared memory. Specifically, for each database file, they create a corresponding shared memory block of, say, 200MB. Multiple clients which connect to the same database file use the same shared memory block. Naturally, if two processes each access the same database file, each process will map the shared memory block into their respective address space. The question arose regarding what happens if one process connects to the same database file twice. Will the two calls to share the same address space, or will each one allocate a separate chunk of address space? Win32 makes...
The 2012/2013 Seattle Symphony subscription season at a glance
The pocket reference guide for 2012/2013.
Why doesn't the Windows 7 Start menu have a pushpin for pinning items?
You may have noticed a minor inconsistency between pinning a program to the Start menu and pinning a destination to a program's Jump List. Although pinned items appear at the top of the respective lists, and both the Start menu and Jump List let you right-click an item and select Pin/Unpin, the Jump List also lets you pin and unpin an item by clicking on the pushpin. Why doesn't the Start menu have a pushpin in addition to the right-click menu? For a time, items on the Start menu did have a pushpin, just like items on Jump Lists. The design had a few problems, however. Start menu items can also have a triangle i...
How do I disable the fault-tolerant heap?
A while back, I linked to a talk by Silviu Calinoiu on the fault-tolerant heap. But what if you don't want the fault-tolerant heap? For example, during program development, you probably want to disable the fault-tolerant heap for your program: If the program is crashing, then it should crash so you can debug it! Method 1 is to disable the fault-tolerant heap globally. While this prevents the fault-tolerant heap from auto-activating in the future, it does not go back and undo activations that were enabled in the past. In other words, you have to remember to do this before your application crashes for the ...
A single-handed effort to keep the memory of $2 bills alive
As I noted when I told the story of the computer programmer who dabbled in making change that my colleague had a lot of money-related quirks. For some reason my colleague felt the $2 bill deserved more attention. Every so often, he would go to the bank and buy $100 in $2 bills, then reintroduce the bills into circulation and enjoy people's reactions to them. (Most cashiers looked at it and recognized that it was legal tender, but couldn't find a good place to put it in the till. It usually got tossed under the drawer with all the checks.) It was a regular occurrence that the bank didn't have that many $2 bills...
Can OANOCACHE be used for non-debug purposes?
Friday asks whether OANOCACHE can be used for non-debug purposes, say to improve stability and/or speed. You can try, but it's not recommended. For one thing, it probably damages stability, because there are many applications out there which unwittingly rely on the BSTR cache to protect them from heap corruption bugs. The Windows team has for years wanted to tweak the BSTR cache (even going so far as getting rid of it entirely), but the compatibility issues always return and quash any attempts at radical restructuring. Identifying applications that rely on the BSTR cache and deploying an appropriate compatibil...
How do FILE_FLAG_SEQUENTIAL_SCAN and FILE_FLAG_RANDOM_ACCESS affect how the operating system treats my file?
Exclusively sequential, nonsequential, and then there's sort-of-sequential.
Why do Microsoft customer records use the abbreviation “cx” for customer?
It used to be something worse.