The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Mar 1, 2024
Post comments count 14
Post likes count 4

C++/WinRT performance trap: Switching to Windows Runtime too soon

Raymond Chen

Stay in the devirtualized world until you are forced to leave.

Feb 29, 2024
Post comments count 7
Post likes count 5

If a parameter isn’t used, what should I pass?

Raymond Chen

It doesn't matter what you pass, but if you have to ask, then just pass zero.

Feb 28, 2024
Post comments count 16
Post likes count 2

On the whole idea of giving away a reference to yourself at destruction

Raymond Chen

Hey, at least it's possible.

Feb 27, 2024
Post comments count 15
Post likes count 2

Mitigating attacks based on knowing the length of a Windows Hello PIN

Raymond Chen

Balancing convenience against security, and how you can tune the knobs toward more security.

Feb 26, 2024
Post comments count 21
Post likes count 1

A C# LINQ one-liner to check if exactly one of a set of conditions is met

Raymond Chen

Maybe not the most efficient, but it's easy to write.

Feb 23, 2024
Post comments count 4
Post likes count 4

Gotcha: Be careful how you shut down your dispatcher queues

Raymond Chen

The dispatcher queue thread isn't useful after it has shut down, so don't try anything.

Feb 22, 2024
Post comments count 1
Post likes count 1

Gotcha: Don’t forget to shut down your dispatcher queues

Raymond Chen

Keep that dispatcher queue controller around, or you'll never be able to clean up.

Feb 21, 2024
Post comments count 1
Post likes count 1

Once your object reaches final_release, you are committed to destructing it (eventually)

Raymond Chen

Don't try to resurrect it.

Feb 20, 2024
Post comments count 3
Post likes count 1

Microspeak: Closing out, duping out

Raymond Chen

Making work items no longer appear on a query.