The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

An ignored exception can be misinterpreted as a hang, particularly in coroutines
Apr 6, 2023
Post comments count 0
Post likes count 1

An ignored exception can be misinterpreted as a hang, particularly in coroutines

Raymond Chen
Raymond Chen

I mean, execution seems to have stopped.

How do I modify the contents of a boxed Windows Runtime value?
Apr 5, 2023
Post comments count 9
Post likes count 0

How do I modify the contents of a boxed Windows Runtime value?

Raymond Chen
Raymond Chen

Once it's in the box, you can't change it.

What is the maximum size of a process environment block?
Apr 4, 2023
Post comments count 4
Post likes count 1

What is the maximum size of a process environment block?

Raymond Chen
Raymond Chen

There's no hard-coded limit in Windows, but maybe somebody else has a limit.

C++17 creates a practical use of the backward array index operator
Apr 3, 2023
Post comments count 3
Post likes count 5

C++17 creates a practical use of the backward array index operator

Raymond Chen
Raymond Chen

Possibly more than just a curiosity.

What is this <CODE>[uuid(…)]</CODE> in front of my C++ class declaration?
Mar 31, 2023
Post comments count 4
Post likes count 2

What is this [uuid(…)] in front of my C++ class declaration?

Raymond Chen
Raymond Chen

It's an old nonstandard syntax that you should try to move away from.

If you want to watch games on your tractor, please use your own iPad
Mar 30, 2023
Post comments count 6
Post likes count 1

If you want to watch games on your tractor, please use your own iPad

Raymond Chen
Raymond Chen

Not an approved use of the embedded system.

How can I box a <CODE>std::optional</CODE> into a C++/WinRT <CODE>IInspectable</CODE>?
Mar 30, 2023
Post comments count 0
Post likes count 1

How can I box a std::optional into a C++/WinRT IInspectable?

Raymond Chen
Raymond Chen

There's a handy conversion for that, but you have to know where to look.

The <CODE>WM_GETDLGCODE</CODE> message is a query message and should not modify state
Mar 29, 2023
Post comments count 2
Post likes count 2

The WM_GETDLGCODE message is a query message and should not modify state

Raymond Chen
Raymond Chen

Wait until you actually get the message.

How can I try to escape the disease-ridden hot-tubs known as the TEMP and Downloads directories?
Mar 28, 2023
Post comments count 16
Post likes count 3

How can I try to escape the disease-ridden hot-tubs known as the TEMP and Downloads directories?

Raymond Chen
Raymond Chen

You can ask that dependent DLLs be loaded from the System32 directory.