The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Inside STL: The atomic shared_ptr
Dec 19, 2024
5
2

Inside STL: The atomic shared_ptr

Raymond Chen
Raymond Chen

There's a lock hiding inside the pointer.

Microspeak terms that didn’t take hold: airspace, synthetics, and AOI
Dec 17, 2024
4
2

Microspeak terms that didn’t take hold: airspace, synthetics, and AOI

Raymond Chen
Raymond Chen

Sometimes they don't stick.

Why do we have header files <CODE><pshpackN.h></CODE> and <CODE><poppack.h></CODE> instead of just issuing the pragma directly?
Dec 16, 2024
0
0

Why do we have header files <pshpackN.h> and <poppack.h> instead of just issuing the pragma directly?

Raymond Chen
Raymond Chen

Because the pragma may not work everywhere.

Converting to a derived class from the future: How to cast from a base class to an incomplete derived class?
Dec 13, 2024
0
1

Converting to a derived class from the future: How to cast from a base class to an incomplete derived class?

Raymond Chen
Raymond Chen

Deferring the definition until the class is complete.

API naming principles for conditional operations: On, When, and If
Dec 12, 2024
0
1

API naming principles for conditional operations: On, When, and If

Raymond Chen
Raymond Chen

Describing when a condition is tested.

What is the <CODE>CONTINUE_IF_FAILED</CODE> equivalent of <CODE>RETURN_IF_FAILED</CODE>?
Dec 11, 2024
8
2

What is the CONTINUE_IF_FAILED equivalent of RETURN_IF_FAILED?

Raymond Chen
Raymond Chen

Be careful how you write it, or better: Don't write it at all.

It rather involved being on the other side of this airtight hatchway: Disabling anti-malware scanning
Dec 10, 2024
3
0

It rather involved being on the other side of this airtight hatchway: Disabling anti-malware scanning

Raymond Chen
Raymond Chen

If you have already infiltrated the process, then you can disable things from the inside.