The Old New Thing

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 could possibly escape the 100-point hole every ...

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

You never need to call the and functions under normal operation. Assuming the heap is serialized (which is the default), all the standard heap functions like and will automatically serialize. In fact, the way they serialize is by calling the¹ and functions! Nearly all heap operations complete in a single call. If your heap is ...
Comments are closed.0 0
Code

What is so special about the instance handle 0x10000000?

A customer wanted to know what it means when the function returns the special value . Um, it means that the library was loaded at ? 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 . It looks like when the special handle is returned from , ...
Comments are closed.0 0
Code

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 ...

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 got stored, or by simply hard-...

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 , the folder opens. But recently it stopped working. Instead of opening the folder, we get the Open With dialog: Choose the ...

Miss Denmark, she is dressed as a mermaid because we couldn't secure the rights from LEGO

Once again, the commentary is NSFW, but once again, they so deserve it. Miss Universe 2012 National Costumes, Part 1 my favorite is the commentary for the Dominican Republic) Miss Universe 2012 National Costumes, Part 2 Miss Universe 2012 National Costumes, Part 3 (but Venezuela wins the things on top her head category) By the way, ...

What is the proper handling of WM_RENDERFORMAT and WM_RENDERALLFORMATS?

Jeremy points out that the documentation for says that the clipboard owner must not call when responding to the and messages. On the other hand, the documentation for says that the owner must call and . Which is it? It's none of them! Let's start with . The reference implementation for a handler goes like this, with all error ...
Comments are closed.0 0
Code

Why do BackupRead and BackupWrite require synchronous file handles?

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