The Old New Thing

The most expensive notepads in Microsoft history

Many years ago, I visited the office of a colleague who worked on Internet Explorer in order to work on some problem or other. As we investigated the issue, we took notes on a 5"×7" tear-off notepad which bore the logo Forms³. My colleague then pointed out to me that we were taking notes on the most expensive notepads in Microsoft...

Dentistry in the Brazil-like future

I dreamed that I was living in a nursing home in some Brazil-like dystopic future. In this future, people had become so horribly disfigured that they wore flesh-colored suits under their clothes all the time just so they would look good "naked". This vanity extended only to people under the age of around 40. The old people in the home were ...

Getting the display name for a shell property

Today's Little Program takes the symbolic name for a shell property and returns a string suitable for display to the end-user, translated into the user's specified display language. #include <windows.h> #include <ole2.h> #include <propsys.h> #include <propkey.h> #include <atlbase.h> #include <atlalloc.h>...
Comments are closed.0 0
Code

Fake film project tries to create real film to hide fakeness (and fails)

In 2010, a group of scam artists pretended that they were making a film, appropriately titled A Landscape of Lies. They did this so that they could claim over £2.7 million in tax credits intended to boost the British film industry. Her Majesty's Revenue and Customs began to suspect something was up when no apparent progress was being ...

Another way to create a process with attributes, maybe worse maybe better

Adam Rosenfield noted that "those sure are a lot of hoops you have to jump through to solve this unusual problem" of specifying which handles are inherited by a new process. Well, first of all, what's so wrong with that? You have to jump through a lot of hoops when you are in an unusual situation. But by definition, most people are not in an...
Comments are closed.0 0
Code

If you’re going to use an interlocked operation to generate a unique value, you need to use it before it’s gone

Is the Interlocked­Increment function broken? One person seemed to think so. We're finding that the Interlocked­Increment is producing duplicate values. Are there are any know bugs in Interlocked­Increment? Because of course when something doesn't work, it's because you are the victim of a vast conspiracy. There is a ...
Comments are closed.0 0
Code

Dark corners of C/C++: The typedef keyword doesn’t need to be the first word on the line

Here are some strange but legal declarations in C/C++: int typedef a; short unsigned typedef b; By convention, the typedef keyword comes at the beginning of the line, but this is not actually required by the language. The above declarations are equivalent to typedef int a; typedef short unsigned b; The C language (but not C++) also ...
Comments are closed.0 0
Code

Microspeak: Tenet

In standard English, a tenet is a fundamental belief held by a group of people. At Microsoft, the term tenet is used as a generalization of what we previously called taxes: Things that everybody has to do in order to be a good software citizen. While taxes are typically very low-level and specific, like supporting roaming user profiles or...

Dreaming about games based on Unicode

I dreamed that two of my colleagues were playing a game based on pantomiming Unicode code points. One of them got LOW QUOTATION MARK, and the other got a variety of ARROW POINTING NORTHEAST, ARROW POINTING EAST, ARROW POINTING SOUTHWEST. I wonder how you would pantomime ZERO WIDTH NON-JOINER...

Getting the current selection from an Explorer window

Today's Little Program prints the current selection in all open Explorer windows. (This is an alternative to the C++ version that involves a ridiculous amount of typing.) var shellWindows = new ActiveXObject("Shell.Application").Windows(); for (var i = 0; i < shellWindows.Count; i++) { var w = shellWindows.Item(i); WScript.StdOut....
Comments are closed.0 0
Code