The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

What are the thread safety requirements of <CODE>HSTRING</CODE> and <CODE>BSTR</CODE>?
Mar 12, 2025
Post comments count 2
Post likes count 3

What are the thread safety requirements of HSTRING and BSTR?

Raymond Chen
Raymond Chen

They do not have thread affinity.

What an insightful observation, you get to wear “the hat”
Mar 11, 2025
Post comments count 9
Post likes count 2

What an insightful observation, you get to wear “the hat”

Raymond Chen
Raymond Chen

Maybe not so insightful.

How do I destroy an ABI pointer that I extracted from a C++/WinRT object?
Mar 10, 2025
Post comments count 0
Post likes count 4

How do I destroy an ABI pointer that I extracted from a C++/WinRT object?

Raymond Chen
Raymond Chen

You can clean it up the ABI way, whatever that is.

To some people, time zones are just a fancy way of sounding important, episode 2
Mar 7, 2025
Post comments count 21
Post likes count 4

To some people, time zones are just a fancy way of sounding important, episode 2

Raymond Chen
Raymond Chen

Words have meaning.

How can I choose a different C++ constructor at runtime?
Mar 6, 2025
Post comments count 6
Post likes count 6

How can I choose a different C++ constructor at runtime?

Raymond Chen
Raymond Chen

Make somebody else do it, and then use copy elision.

I tried to subscribe to a C++/WinRT event, but my callback was never called
Mar 5, 2025
Post comments count 0
Post likes count 2

I tried to subscribe to a C++/WinRT event, but my callback was never called

Raymond Chen
Raymond Chen

Check how you registered your event handler.

Microspeak: Respin
Mar 4, 2025
Post comments count 2
Post likes count 2

Microspeak: Respin

Raymond Chen
Raymond Chen

Spin it up again, baby.

Lexically scoped functions accessing parent locals: The display
Mar 3, 2025
Post comments count 1
Post likes count 2

Lexically scoped functions accessing parent locals: The display

Raymond Chen
Raymond Chen

Using a well-known location instead of copying frame pointers.

C++/WinRT implementation inheritance: Notes on <CODE>winrt::implements</CODE>, part 8
Feb 28, 2025
Post comments count 1
Post likes count 1

C++/WinRT implementation inheritance: Notes on winrt::implements, part 8

Raymond Chen
Raymond Chen

Comparing the options.