The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
SAFEARRAY after my method returns?" />
Jan 29, 2026
Post comments count
0
Post likes count
1
How can I retain access to the data in a SAFEARRAY after my method returns?
Find a way to take ownership.
SafeArrayAddRef?" />
Jan 28, 2026
Post comments count
0
Post likes count
1
Why did I lose the data even though I called SafeArrayAddRef?
You have to use the original pointer, but even that won't be good enough.
SafeArrayAddRef and extending APIs in general" />
Jan 27, 2026
Post comments count
2
Post likes count
1
A digression on the design and implementation of SafeArrayAddRef and extending APIs in general
The concerns when adding a feature to an existing API.
SafeArrayAccessData and
SafeArrayAddRef?" />
Jan 26, 2026
Post comments count
0
Post likes count
2
What's the difference between SafeArrayAccessData and SafeArrayAddRef?
Two ways of preserving the data.
scope_exit for running code at scope exit. C# says "We have
scope_exit at home."" />
Jan 23, 2026
Post comments count
15
Post likes count
4
C++ has scope_exit for running code at scope exit. C# says "We have scope_exit at home."
You can wrap it in an IDisposable.
Jan 22, 2026
Post comments count
6
Post likes count
3
A simple helper function for attaching a progress handler to a Windows Runtime IAsyncActionWithProgress or IAsyncOperationWithProgress
It doesn't do much, but it saves typing.
Jan 21, 2026
Post comments count
2
Post likes count
2
On the proper usage of a custom Win32 dialog class
You are replacing the window procedure, not the dialog procedure.
Jan 20, 2026
Post comments count
5
Post likes count
2
Microspeak: On fire, putting out fires
Dealing with emergencies.
Jan 19, 2026
Post comments count
8
Post likes count
6
What was the secret sauce that allows for a faster restart of Windows 95 if you hold the shift key?
An old flag from 16-bit Windows.