The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Maybe somebody can explain to me how weak references solve the ODR problem
Nov 21, 2025
Post comments count 3
Post likes count 0

Maybe somebody can explain to me how weak references solve the ODR problem

Raymond Chen
Raymond Chen

I don't see it.

In the commit-on-demand pattern, what happens if an access violation straddles multiple pages?
Nov 20, 2025
Post comments count 2
Post likes count 1

In the commit-on-demand pattern, what happens if an access violation straddles multiple pages?

Raymond Chen
Raymond Chen

The access violation exceptions will continue until commit improves.

Is <CODE>Write­Process­Memory</CODE> faster than shared memory for transferring data between two processes?
Nov 19, 2025
Post comments count 3
Post likes count 6

Is Write­Process­Memory faster than shared memory for transferring data between two processes?

Raymond Chen
Raymond Chen

Shared memory is the copy-free solution.

Microspeak: Little-r
Nov 18, 2025
Post comments count 1
Post likes count 4

Microspeak: Little-r

Raymond Chen
Raymond Chen

Harkening back to a very old mail program.

How can I detect that Windows is running in S-Mode, redux
Nov 17, 2025
Post comments count 21
Post likes count 2

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

Raymond Chen
Raymond Chen

Doing it on hard mode.

I can use <CODE>WM_<WBR>COPY<WBR>DATA</CODE> to send a block of data to another window, but how does it send data back?
Nov 14, 2025
Post comments count 9
Post likes count 2

I can use WM_COPYDATA to send a block of data to another window, but how does it send data back?

Raymond Chen
Raymond Chen

They can send it back with their own WM_COPY­DATA message, or they can put it in an agreed-upon shared location.

Could we use CTAD to simplify the use of WRL’s Callback function?
Nov 13, 2025
Post comments count 5
Post likes count 1

Could we use CTAD to simplify the use of WRL’s Callback function?

Raymond Chen
Raymond Chen

Not directly, but maybe indirectly.

Non-recursively deleting a binary tree in constant space: Rotating the tree
Nov 12, 2025
Post comments count 5
Post likes count 2

Non-recursively deleting a binary tree in constant space: Rotating the tree

Raymond Chen
Raymond Chen

Preserving in-order while linearizing.

Behind the scenes on how Windows 95 application compatibility patched broken programs
Nov 11, 2025
Post comments count 7
Post likes count 4

Behind the scenes on how Windows 95 application compatibility patched broken programs

Raymond Chen
Raymond Chen

Replacing bytes with the greatest of care.