The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

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.

Using the contents of a file to define an MSBuild property
Mar 27, 2023
Post comments count 2
Post likes count 1

Using the contents of a file to define an MSBuild property

Raymond Chen
Raymond Chen

A little trick that maybe should be better known.

Adventures in application compatibility: The case of the jump into the middle of an instruction from nowhere
Mar 24, 2023
Post comments count 25
Post likes count 7

Adventures in application compatibility: The case of the jump into the middle of an instruction from nowhere

Raymond Chen
Raymond Chen

Another rogue patcher.

How unique must the <CODE>uIdSubclass</CODE> parameter be when I call <CODE>Set­Window­Subclass</CODE>?
Mar 23, 2023
Post comments count 0
Post likes count 2

How unique must the uIdSubclass parameter be when I call Set­Window­Subclass?

Raymond Chen
Raymond Chen

Each one identifies an instance of the subclass for the window.

Why am I getting a weird error about <CODE>promise_type</CODE> when I try to write a coroutine? part 2
Mar 22, 2023
Post comments count 0
Post likes count 0

Why am I getting a weird error about promise_type when I try to write a coroutine? part 2

Raymond Chen
Raymond Chen

Are you even writing a coroutine?

Why does the usage of the initial registers of a Win32 process depend on whether it is a 32-bit or 64-bit process?
Mar 21, 2023
Post comments count 5
Post likes count 1

Why does the usage of the initial registers of a Win32 process depend on whether it is a 32-bit or 64-bit process?

Raymond Chen
Raymond Chen

Well, I mean, it's a different processor.