The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

A clarification on the multithreading constraints of the <CODE>Encrypt­Message</CODE> function
Nov 9, 2023
Post comments count 0
Post likes count 0

A clarification on the multithreading constraints of the Encrypt­Message function

Raymond Chen
Raymond Chen

Reading a sentence in the context of the whole paragraph.

How can I get information about media playing on the system, and optionally control their playback?
Nov 8, 2023
Post comments count 0
Post likes count 0

How can I get information about media playing on the system, and optionally control their playback?

Raymond Chen
Raymond Chen

Going to the global system media transport controls world.

“Stop sharing this folder” is not the same as “Never share this folder”
Nov 7, 2023
Post comments count 3
Post likes count 4

“Stop sharing this folder” is not the same as “Never share this folder”

Raymond Chen
Raymond Chen

It stops sharing the folder, but that doesn't prevent you from starting it again.

Why doesn’t reduction by modulo work for floating point values?
Nov 6, 2023
Post comments count 3
Post likes count 3

Why doesn’t reduction by modulo work for floating point values?

Raymond Chen
Raymond Chen

Working out why it works for integers and seeing what goes wrong.

Why does unsafe multithreaded use of an <CODE>std::<WBR>unordered_<WBR>map</CODE> crash more often than unsafe multithreaded use of a <CODE>std::<WBR>map</CODE>?
Nov 3, 2023
Post comments count 1
Post likes count 3

Why does unsafe multithreaded use of an std::unordered_map crash more often than unsafe multithreaded use of a std::map?

Raymond Chen
Raymond Chen

It's all in the implementation details.

How come my custom exception message is lost when it is thrown from a <CODE>IAsyncAction^</CODE>?
Nov 2, 2023
Post comments count 0
Post likes count 0

How come my custom exception message is lost when it is thrown from a IAsyncAction^?

Raymond Chen
Raymond Chen

Things that survive in the C++ world and things that are lost when you cross the ABI.

More notes on use of the <CODE>DS_<WBR>CONTROL</CODE> style
Nov 1, 2023
Post comments count 2
Post likes count 1

More notes on use of the DS_CONTROL style

Raymond Chen
Raymond Chen

Styles that have to go in, and styles that have to come out. (And styles that you can choose.)

What is the thread reaper?
Oct 31, 2023
Post comments count 9
Post likes count 2

What is the thread reaper?

Raymond Chen
Raymond Chen

Should you fear the thread reaper?

What are the dire consequences of not removing all the properties that were set via <CODE>SetProp</CODE>?
Oct 30, 2023
Post comments count 5
Post likes count 2

What are the dire consequences of not removing all the properties that were set via SetProp?

Raymond Chen
Raymond Chen

Not so much any more, but it could be a sign that you forgot something.