2012 year-end link clearance

Another round of the semi-annual link clearance. Snark New! Improved! Shape Up Your Life!: The New York Times book review of Timothy Ferriss’s The 4-Hour Body reads like a recap on Television Without Pity, but this time they’re making fun of a book! “‘The 4-Hour Body’ reads as if The New England Journal of Medicine…


Why can’t you rename deleted items in the Recycle Bin?

I misread a question from commenter Comedy Gaz, so let’s try it again. (Good thing I held one last Suggestion Box Monday of the year in reserve.) Why can’t you rename deleted items in the Recycle Bin? Okay, first of all, “Why would you want to do this?” I see no explanation for how this…


What do HeapLock and HeapUnlock do, and when do I need to call them?

You never need to call the Heap­Lock and Heap­Unlock functions under normal operation. Assuming the heap is serialized (which is the default), all the standard heap functions like Heap­Allocate and Heap­Free will automatically serialize. In fact, the way they serialize is by calling the¹ Heap­Lock and Heap­Unlock functions! Nearly all heap operations complete in a…


What is so special about the instance handle 0x10000000?

A customer wanted to know what it means when the Load­Library function returns the special value 0x10000000. Um, it means that the library was loaded at 0x10000000? Okay, here’s some more information: “We’re trying to debug an application which loads DLLs and attempts to hook their registry accesses when they call Dll­Register­Server. It looks like…


What celebration of Kwanzaa would be complete without Sandra Lee’s infamous Kwanzaa cake?

For those unfamiliar with Sandra Lee, her gimmick is that the ingredients in her recipes are primarily prepared foods, a food-preparation technique (I’m reluctant to call it cooking) which she calls “semi-homemade.” First, the creation one critic called “an edible hate crime.” Next, the apology from the creator. I guess I imagined something more refined….


A question about endian-ness turns out to be the wrong question

Via a customer liaison, we received what seemed like a simple question: “How can I detect whether a Windows machine is big-endian or little-endian?” You could actually answer this question (say by coughing up a code fragment that stores a 16-bit value to memory and then takes it apart into bytes to see how it…


You too can use your psychic powers: Spaces in paths

I’m going to be lazy today and make you solve the problem. Did a recent security hotfix change change the way we handle UNC paths with spaces? Normally, if we open the Run dialog and type \\server\share\Support Library\, the Support Library folder opens. But recently it stopped working. Instead of opening the Support Library folder,…


What is the proper handling of WM_RENDERFORMAT and WM_RENDERALLFORMATS?

Jeremy points out that the documentation for Set­Clipboard­Data says that the clipboard owner must not call Open­Clipboard when responding to the WM_RENDER­FORMAT and WM_RENDER­ALL­FORMATS messages. On the other hand, the documentation for WM_RENDER­ALL­FORMATS says that the owner must call Open­Clipboard and Empty­Clipboard. Which is it? It’s none of them! Let’s start with WM_RENDER­FORMAT. The reference…


Why do BackupRead and BackupWrite require synchronous file handles?

The Backup­Read and Backup­Write functions require that the handle you provide by synchronous. (In other words, that they not be opened with FILE_FLAG_OVERLAPPED.) A customer submitted the following question: We have been using asynchronous file handles with the Backup­Read. Every so often, the call to Backup­Read will fail, but we discovered that as a workaround,…