The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Detecting and reporting all unhandled C++ exceptions as well as all unhandled structured exceptions
Jul 11, 2025
Post comments count 1
Post likes count 2

Detecting and reporting all unhandled C++ exceptions as well as all unhandled structured exceptions

Raymond Chen
Raymond Chen

Closing another exit point.

Our first attempt to detect and report all unhandled C++ exceptions as well as all unhandled structured exceptions
Jul 10, 2025
Post comments count 5
Post likes count 2

Our first attempt to detect and report all unhandled C++ exceptions as well as all unhandled structured exceptions

Raymond Chen
Raymond Chen

Identifying and classifying the exit points.

When I install an unhandled structured exception filter, why doesn’t <CODE>std::<WBR>terminate</CODE> get called?
Jul 9, 2025
Post comments count 2
Post likes count 4

When I install an unhandled structured exception filter, why doesn’t std::terminate get called?

Raymond Chen
Raymond Chen

You're using the same hook that the compiler uses to call std::terminate.

A walkthrough of the original Microsoft Building 3
Jul 8, 2025
Post comments count 6
Post likes count 0

A walkthrough of the original Microsoft Building 3

Raymond Chen
Raymond Chen

Don't get lost on your walk down memory lane.

Dubious security vulnerability: If I perform this complex series of manual steps, I can crash a program I am running
Jul 7, 2025
Post comments count 2
Post likes count 1

Dubious security vulnerability: If I perform this complex series of manual steps, I can crash a program I am running

Raymond Chen
Raymond Chen

What security boundary did you cross?

Why doesn’t <CODE>LVIF_<WBR>INDENT</CODE> work without an image list?
Jul 4, 2025
Post comments count 3
Post likes count 0

Why doesn’t LVIF_INDENT work without an image list?

Raymond Chen
Raymond Chen

Its original client had an image list.

German language cheat sheet: On changing quantities
Jul 3, 2025
Post comments count 13
Post likes count 0

German language cheat sheet: On changing quantities

Raymond Chen
Raymond Chen

How much there is, and how is it changing.

If the <CODE>Format­Message</CODE> function fails, and I requested that it allocate a buffer, do I have to free the buffer?
Jul 3, 2025
Post comments count 0
Post likes count 1

If the Format­Message function fails, and I requested that it allocate a buffer, do I have to free the buffer?

Raymond Chen
Raymond Chen

There was no buffer returned, so there's nothing to free anyway.

Unintended yet somehow entirely expected consequences of marking a COM interface as local
Jul 2, 2025
Post comments count 1
Post likes count 1

Unintended yet somehow entirely expected consequences of marking a COM interface as local

Raymond Chen
Raymond Chen

If it's local-only, then it can't be remote.