The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Can we get weak functions for static linking? The Visual C++ compiler says “We have weak functions at home”
Oct 3, 2025
Post comments count 0
Post likes count 1

Can we get weak functions for static linking? The Visual C++ compiler says “We have weak functions at home”

Raymond Chen
Raymond Chen

It's already there, just under a different paradigm.

The problem with inferring from a function call operator is that there may be more than one
Oct 2, 2025
Post comments count 0
Post likes count 0

The problem with inferring from a function call operator is that there may be more than one

Raymond Chen
Raymond Chen

auto parameters make this easy to write, particularly for lambdas.

How do I convert a <CODE>FILETIME</CODE> to a C++ clock like <CODE>std::system_clock</CODE> or <CODE>winrt::clock</CODE>?
Oct 1, 2025
Post comments count 1
Post likes count 2

How do I convert a FILETIME to a C++ clock like std::system_clock or winrt::clock?

Raymond Chen
Raymond Chen

The winrt::clock has a conversion for you.

Microspeak: Convicted
Sep 30, 2025
Post comments count 9
Post likes count 1

Microspeak: Convicted

Raymond Chen
Raymond Chen

False backformation.

How can I enumerate the overflow icons in the Notification Area without showing them?
Sep 29, 2025
Post comments count 1
Post likes count 2

How can I enumerate the overflow icons in the Notification Area without showing them?

Raymond Chen
Raymond Chen

If they aren't shown, then they aren't automatable, so there's no requirement that they exist in the UI automation tree.

Why didn’t Windows 95 setup install a miniature Windows 95 so that it could be written as a 32-bit program?
Sep 26, 2025
Post comments count 8
Post likes count 5

Why didn’t Windows 95 setup install a miniature Windows 95 so that it could be written as a 32-bit program?

Raymond Chen
Raymond Chen

Getting to the GUI quickly, and rebooting only once.

Samples note: Use comments to describe what code does, not what you wish the code would do
Sep 25, 2025
Post comments count 8
Post likes count 4

Samples note: Use comments to describe what code does, not what you wish the code would do

Raymond Chen
Raymond Chen

Comments explain the code. They are not substitutes for the code.

Why is Windows still tinkering with critical sections?
Sep 24, 2025
Post comments count 13
Post likes count 3

Why is Windows still tinkering with critical sections?

Raymond Chen
Raymond Chen

The critical section may be an old dog, but it's still learning new tricks.

Another lesson learned from the Windows 98 on-stage USB blue screen
Sep 23, 2025
Post comments count 1
Post likes count 1

Another lesson learned from the Windows 98 on-stage USB blue screen

Raymond Chen
Raymond Chen

Test before using.