The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Nov 16, 2023
Post comments count 0
Post likes count 2

What happened to the custom exception description I threw from a C++/WinRT IAsyncAction?

Raymond Chen

The description is just a courtesy and is not part of the API contract.

Nov 15, 2023
Post comments count 2
Post likes count 2

Why does calling a coroutine allocate a lot of stack space even though the coroutine frame is on the heap?

Raymond Chen

Heap elision optimization kicks in, and doesn't kick out.

Nov 14, 2023
Post comments count 5
Post likes count 3

Starting on the other side of this airtight hatchway: Running a program that leaks memory

Raymond Chen

There are a lot of things you can do to consume memory.

Nov 13, 2023
Post comments count 2
Post likes count 4

What is the difference between UuidToString, StringFromCLSID, StringFromIID, and StringFromGUID2?

Raymond Chen

Different ways of stringizing a GUID.

Nov 10, 2023
Post comments count 2
Post likes count 2

The case of the invalid argument exception from a method that takes no arguments

Raymond Chen

Where did the invalid argument come from?

Nov 9, 2023
Post comments count 0
Post likes count 1

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

Raymond Chen

Reading a sentence in the context of the whole paragraph.

Nov 8, 2023
Post comments count 0
Post likes count 2

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

Raymond Chen

Going to the global system media transport controls world.

Nov 7, 2023
Post comments count 3
Post likes count 5

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

Raymond Chen

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

Nov 6, 2023
Post comments count 3
Post likes count 4

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

Raymond Chen

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