The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

In C++/WinRT, how can I await multiple coroutines and capture the results?, part 2
Jan 11, 2024
Post comments count 0
Post likes count 2

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

Raymond Chen
Raymond Chen

Wrapping the results and returning them in a tuple.

In C++/WinRT, how can I await multiple coroutines and capture the results?, part 1
Jan 10, 2024
Post comments count 0
Post likes count 1

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

Raymond Chen
Raymond Chen

Using a custom awaiter to suppress the GetResults().

After I accidentally denied access to everyone, how do I get access back?
Jan 9, 2024
Post comments count 10
Post likes count 1

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

Raymond Chen
Raymond Chen

Congratulations, you locked your keys in the car.

How do I prevent my C++/WinRT implementation class from participating in COM aggregation?
Jan 8, 2024
Post comments count 0
Post likes count 1

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

Raymond Chen
Raymond Chen

Looking for a clue.

The case of the vector with an impossibly large size
Jan 5, 2024
Post comments count 4
Post likes count 2

The case of the vector with an impossibly large size

Raymond Chen
Raymond Chen

Play threading games, win threading prizes.

How can I specify icons for my app to use on the Start menu in high contrast mode?
Jan 4, 2024
Post comments count 9
Post likes count 3

How can I specify icons for my app to use on the Start menu in high contrast mode?

Raymond Chen
Raymond Chen

Put them in your manifest.

Why doesn’t my code compile when I change a <CODE>shared_ptr<T>(p)</CODE> to an equivalent <CODE>make_shared<T>(p)</CODE>?
Jan 3, 2024
Post comments count 1
Post likes count 1

Why doesn’t my code compile when I change a shared_ptr<T>(p) to an equivalent make_shared<T>(p)?

Raymond Chen
Raymond Chen

It depends on who is doing the parameter conversion.

It rather involved being on the other side of this airtight hatchway: Attacking another program by modifying its memory
Jan 2, 2024
Post comments count 7
Post likes count 3

It rather involved being on the other side of this airtight hatchway: Attacking another program by modifying its memory

Raymond Chen
Raymond Chen

If you assume the existence of a vulnerability, you can use that vulnerability to attack something.

How do I prevent my ATL class from participating in COM aggregation? <CODE>DECLARE_<WBR>NOT_<WBR>AGGREGATABLE</CODE> didn’t work
Jan 1, 2024
Post comments count 0
Post likes count 1

How do I prevent my ATL class from participating in COM aggregation? DECLARE_NOT_AGGREGATABLE didn’t work

Raymond Chen
Raymond Chen

That marker applies only to creation via the class factory.