The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Under what conditions could a <CODE>Read­File</CODE> or <CODE>Write­File</CODE> fail to transfer all of the bytes, and how do I detect that?
Aug 8, 2025
Post comments count 2
Post likes count 1

Under what conditions could a Read­File or Write­File fail to transfer all of the bytes, and how do I detect that?

Raymond Chen
Raymond Chen

If there is not enough data to read, or not room to write.

How can I detect that Windows is running in S-Mode?
Aug 7, 2025
Post comments count 6
Post likes count 2

How can I detect that Windows is running in S-Mode?

Raymond Chen
Raymond Chen

Check the code integrity policy.

How do I disable pieces of the property sheet for a service in the Services MMC snap-in?
Aug 6, 2025
Post comments count 6
Post likes count 4

How do I disable pieces of the property sheet for a service in the Services MMC snap-in?

Raymond Chen
Raymond Chen

There's no secret setting. It's all based on access control.

Why are Windows semiannual updates named H1 and H2?
Aug 5, 2025
Post comments count 12
Post likes count 3

Why are Windows semiannual updates named H1 and H2?

Raymond Chen
Raymond Chen

To address an unconscious bias.

How can I read more than 4GB of data from a file in a single call to <CODE>Read­File</CODE>?
Aug 4, 2025
Post comments count 22
Post likes count 1

How can I read more than 4GB of data from a file in a single call to Read­File?

Raymond Chen
Raymond Chen

You can't, but you can try to fake it.

Two related questions about keeping track of PIDs of IPC clients
Aug 1, 2025
Post comments count 2
Post likes count 0

Two related questions about keeping track of PIDs of IPC clients

Raymond Chen
Raymond Chen

Since you're doing IPC, you may as well let IPC do the work for you.

A consequence of the weird <CODE>wReserved</CODE> value at the start of the <CODE>DECIMAL</CODE> structure
Jul 31, 2025
Post comments count 7
Post likes count 1

A consequence of the weird wReserved value at the start of the DECIMAL structure

Raymond Chen
Raymond Chen

It overwrites things by accident.

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

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

Raymond Chen
Raymond Chen

If you don't really care about what happens if something goes wrong.

Why is there a window with no name blocking Windows shutdown?
Jul 29, 2025
Post comments count 16
Post likes count 3

Why is there a window with no name blocking Windows shutdown?

Raymond Chen
Raymond Chen

They never expected you to see it.