The Old New Thing


What is WofCompressedData? Does WOF mean that Windows is a dog?

It stands for Windows Overlay Filter, but that name doesn't really tell you much.

A simple workaround for the fact that std::equal takes its predicate by value

Pass something else that is easy to copy.

Why does SetFocus fail without telling me why?

If you're going to replace part of the operating system, you have to replace the side effects, too.

What should you do if somebody passes a null pointer for a parameter that should never be null? What if it’s a Windows Runtime class?

They messed up, so make them suffer the consequences, but make the consequences diagnosable.

If you can use GUIDs to reference files, why not use them to remember “recently used” files so they can survive renames and moves?

Because the file that you think is the same file may not actually be the same file.

What order do the items in the “New” menu appear? It looks kind of random.

It's alphabetical order, but not in the obvious way.

How can I determine in a C++ header file whether C++/CX is enabled? How about C++/WinRT?

For conditionally enabling features, say.

The Resource Compiler defaults to CP_ACP, even in the face of subtle hints that the file is UTF-8

Subtlety is not its strong point.

Why does my C++/WinRT project get errors of the form “Unresolved external symbol void* __cdecl winrt_make_YourNamespace_YourClass(void)“?

You enabled optimizations, but there's some extra bookkeeping to support those optimizations.

Why does my C++/WinRT project get errors of the form ‘winrt::impl::produce<D, I>‘: cannot instantiate abstract class, missing method GetBindingConnector

The header file requirement was always present, but you often got away with omitting it. Not so much any more.