The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts

On writing functions that accept any specialization of a C++ template type

There are the obvious arguments, the non-obvious arguments, and the invisible arguments.

Getting a strong reference from the this
pointer too late

Once destruction begins, strong references mean nothing.

How can I trigger a recalc of the mouse cursor after I changed some of my internal application state?, follow-up

You still need to filter to your window, so you don't mess up another window on the same thread.

Don’t name your header file security.h
either

You may be overriding an SDK header by mistake.

On creating (and using) a transforming iterator

It lets you change the thing being iterated over, on the fly.

Speeding up the insertion of a sorted (or mostly-sorted) key list into a std::map
or other ordered associative container

Provide a hint for the location of the next item.

On catching exceptions in PPL tasks

You also have to catch the exception when it comes out the end of the task chain.

What is the opposite of LVM_SORTITEMS
?

How can you unring the bell?

How do I free the pointers returned by functions like GetTokenInformation
?

They are all pointers back into the main memory block.