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...
View ArticleMicrospeak: 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...
View ArticleDark corners of C/C++: The typedef keyword doesn't need to be the first word...
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...
View ArticleIf you're going to use an interlocked operation to generate a unique value,...
Is the InterlockedIncrement function broken? One person seemed to think so. We're finding that the InterlockedIncrement is producing duplicate values. Are there are any know bugs in...
View ArticleAnother 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...
View ArticleFake 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...
View ArticleGetting 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...
View ArticleDentistry 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...
View ArticleThe 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...
View ArticleHow do I get the current value of the RSP register from a C/C++ function? (No...
A customer using Visual Studio wanted to know how to obtain the current value of the x64 RSP register from a C/C++ function. They noted that on the x86, you can drop to inline assembly, and on the...
View ArticleAny setting you expose to the user you implicitly expose to applications
Often, in response to some sort of design decision, people will say, "Well, sure, you made this decision because it would allow applications to do Bad Thing, but why not expose it as a setting the...
View ArticleCreating a simple pidl: For the times you care enough to send the very fake
I'll assume that we all know what pidls are and how the shell namespace uses them. That's the prerequisite for today. A simple pidl is an item ID list that refers to a file or directory that may not...
View ArticleReading mouse input from a console program, and programmatically turning off...
Today's Little program shows how to read mouse input from a console program. You might use this if you are writing a console-mode text editor with mouse support, or maybe you want to want to add mouse...
View ArticleExtending process attribute inheritance beyond its current boundaries
I dreamed that I had to fix a bug in CreateProcess where it failed to inherit the parent process's assault weapons.
View ArticleHow to tell the poseurs from the actual Windows developers
Poseurs will call Windows versions by their programmatic version numbers. For example, they will call Windows Vista "NT6" and Windows 7 "NT6.1". Trust me, nobody on the Windows team calls the products...
View ArticleMathematical formulas are designed to be pretty, not to be suitable for...
When you ask a mathematician to come up with a formula to solve a problem, you will get something that looks pretty, but that doesn't mean that it lends itself well to computation. For example,...
View ArticleWhy am I getting LNK2019 unresolved external for my inline function?
More than once, I'm seen somebody confused by how inline functions work. I have implemented a few inline functions in one of my cpp files, and I want to use it from other cpp files, so I declare them...
View ArticleIf you want to use a name for your file mapping, don't just use the name of...
The original question from the customer was why they couldn't get named file mappings to work at all, but it turns out that the reason is that they were using the full path to the file as the name,...
View ArticleHow can I display a live screenshot of a piece of another application?
Today's Little Program takes a rectangular portion of another application and continuously replicates it in its own client area. You might want to do this if you want to monitor a portion of an...
View Article