The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Oct 2, 2023
Post comments count 0
Post likes count 1

How do I manually update a remote tracking branch, say, to undo a fetch?

Raymond Chen

Updating refs to point to whatever you like.

Sep 29, 2023
Post comments count 0
Post likes count 1

Template meta-programming: Avoiding saying a type before it is complete

Raymond Chen

Deferring use until after the class is defined.

Sep 28, 2023
Post comments count 2
Post likes count 2

C++/WinRT gotcha: get_strong() will produce a broken strong reference if destruction has already begun

Raymond Chen

A strong reference to nothing.

Sep 27, 2023
Post comments count 4
Post likes count 3

The dangers of releasing the last strong reference from within its own callback

Raymond Chen

Deadlocking with yourself.

Sep 26, 2023
Post comments count 8
Post likes count 6

Why is kernel32.dll running in user mode and not kernel mode, like its name implies?

Raymond Chen

It's just a name, and it comes from the days before user-mode/kernel-mode separation.

Sep 25, 2023
Post comments count 1
Post likes count 3

GetQueueStatus and the queue state

Raymond Chen

There's stuff going on that's hiding behind the innocuous-looking name.

Sep 22, 2023
Post comments count 3
Post likes count 6

When I try to call an exported function, the target crashes when it tries to call any Windows function

Raymond Chen

Using what you know about how functions are imported to construct a theory that matches the evidence.

Sep 21, 2023
Post comments count 9
Post likes count 8

How does Explorer calculate the “Date” of a file?

Raymond Chen

Mapping the generic concept to specific file types.

Sep 20, 2023
Post comments count 1
Post likes count 1

Why does my C++/WinRT project get unresolved externals for constructors?

Raymond Chen

You forgot to include the namespace header file, didn't you.