The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Mar 18, 2025
Post comments count 7
Post likes count 7

Why didn’t Windows 95 setup use a miniature version of Windows 95 as its fallback GUI?

Raymond Chen

Avoiding an interim GUI environment.

Mar 17, 2025
Post comments count 3
Post likes count 3

Dubious security vulnerability: A program does not run correctly if you run it the wrong way

Raymond Chen

So what did you expect?

Mar 14, 2025
Post comments count 0
Post likes count 2

The case of COM failing to pump messages in a single-threaded COM apartment

Raymond Chen

A customer encountered a hang caused by COM not pumping messages while waiting for a cross-thread operation to complete. They were using the class for serializing asynchronous operations on a UI thread they created to handle accessibility callbacks. The hang stack looked like this: We see that we have a UI thread (notice the at the bottom of the stack), yet COM decided to block without pumping messages ( instead of (). Is this a bug in the task sequencer? Let's look at the stack more closely. A message arrived via , and that then queued a task into the task sequencer. The saw that the task sequencer had...

Mar 13, 2025
Post comments count 12
Post likes count 3

Making sure that a DLL loads only from your application directory

Raymond Chen

You can ask for it as an option, but think about what you're actually protecting against.

Mar 12, 2025
Post comments count 2
Post likes count 4

What are the thread safety requirements of HSTRING and BSTR?

Raymond Chen

They do not have thread affinity.

Mar 11, 2025
Post comments count 9
Post likes count 3

What an insightful observation, you get to wear “the hat”

Raymond Chen

Maybe not so insightful.

Mar 10, 2025
Post comments count 0
Post likes count 4

How do I destroy an ABI pointer that I extracted from a C++/WinRT object?

Raymond Chen

You can clean it up the ABI way, whatever that is.

Mar 7, 2025
Post comments count 21
Post likes count 4

To some people, time zones are just a fancy way of sounding important, episode 2

Raymond Chen

Words have meaning.

Mar 6, 2025
Post comments count 6
Post likes count 6

How can I choose a different C++ constructor at runtime?

Raymond Chen

Make somebody else do it, and then use copy elision.