The Old New Thing

You just have to accept that the file system can change

A customer who is writing some sort of code library wants to know how they should implement a function that determines whether a file exists. The usual way of doing this is by calling , but what they've found is that sometimes will report that a file exists, but when they get around to accessing the file, they get the error . The lesser ...

Proto-Microspeak: Pre-envisioning

I have only one citation, so it may not become proper Microspeak. Too early to tell. Further discussion will definitely generate a lot of good ideas and help drive them for pre-envisioning. Established Microspeak or not, I still don't know what it means...

VirtualLock only locks your memory into the working set

When you lock memory with it locks the memory into your process's working set. It doesn't mean that the memory will never be paged out. It just means that the memory won't be paged out as long as there is a thread executing in your process, because a process's working set need be present in memory only when the process is actually executing...

Why do we even have the DefWindowProc function?

Some time ago, I looked at two ways of reimplementing the dialog procedure (method 1, method 2). Commenter "8" wondered why we have a function at all. Couldn't window procedures have followed the dialog box model, where they simply return to indicate that they want default processing to occur? Then there would be no need to ...

Buy an island, or a country, or at least a replica of one

Off the coast of Dubai, Al Nakheel Properties is building a chain of 300 islands in the shape of the world. Learn more about the project by watching their video. The growing artificiality and commercialization of Dubai concerns some people, however. Locals joke that Dubai's call to prayer is "Attention shoppers!" The naysayers can cluck ...

Why does GetDiskFreeSpaceEx return the wrong amount of free space?

One customer discovered that viewing the properties of a drive from Explorer shows the amount of disk free space significantly lower than the actual amount of free disk space as resported by the disk management snap-in. The command prompt agrees with Explorer and shows the incorrect result. What's going on? Not surprisingly, both Explorer and...

The Acorn Wand, key to a magical puzzle hunt

Puzzle hunts are a popular pastime at Microsoft. For the Microsoft Intern Puzzleday 2007, the puzzle design team decided upon a Harry Potter theme. Competitors ("students") formed teams ("study groups") as they attended classes at the Hogwarts campus at Microsoft. Of course, since this is Harry Potter, you need a magic wand, so the puzzle ...