The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Jan 17, 2024
Post comments count 1
Post likes count 2

Getting a strong reference from the this pointer too soon

Raymond Chen

Giving out strong references to an object before you can guarantee that it will work.

Jan 16, 2024
Post comments count 4
Post likes count 9

What is a hard error, and what makes it harder than an easy error?

Raymond Chen

A throwback to the early days of 16-bit Windows.

Jan 15, 2024
Post comments count 5
Post likes count 2

C++/WinRT gotcha: Not all exceptions derive from hresult_error

Raymond Chen

There are also C++ standard exceptions, particularly <CODE>std::bad_alloc</CODE>.

Jan 12, 2024
Post comments count 1
Post likes count 2

In C++/WinRT, how can I await multiple coroutines and capture the results?, part 3

Raymond Chen

Dealing with awaitables that return <CODE>void</CODE>, and questioning our life choices.

Jan 11, 2024
Post comments count 0
Post likes count 3

In C++/WinRT, how can I await multiple coroutines and capture the results?, part 2

Raymond Chen

Wrapping the results and returning them in a tuple.

Jan 10, 2024
Post comments count 0
Post likes count 2

In C++/WinRT, how can I await multiple coroutines and capture the results?, part 1

Raymond Chen

Using a custom awaiter to suppress the <CODE>GetResults()</CODE>.

Jan 9, 2024
Post comments count 10
Post likes count 2

After I accidentally denied access to everyone, how do I get access back?

Raymond Chen

Congratulations, you locked your keys in the car.

Jan 8, 2024
Post comments count 0
Post likes count 2

How do I prevent my C++/WinRT implementation class from participating in COM aggregation?

Raymond Chen

Looking for a clue.

Jan 5, 2024
Post comments count 4
Post likes count 3

The case of the vector with an impossibly large size

Raymond Chen

Play threading games, win threading prizes.