The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Mar 6, 2024
Post comments count 5
Post likes count 1

How do I make an expression non-movable? What’s the opposite of std::move?

Raymond Chen

You can turn it into a const thing so it's no longer movable, in a conventional sense.

Mar 5, 2024
Post comments count 4
Post likes count 2

In domain\user syntax, you can often use the period as an abbreviation for “this computer”

Raymond Chen

A bit of a typing saver, particularly with complex machine names.

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

Is shadowing a member variable from a base class a bad thing? Maybe, but maybe not.

Raymond Chen

It depends on the order in which things occurred.

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.