The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Why does <ODE>INVALID_<WBR>HANDLE_<WBR>VALUE</CODE> cast through a <CODE>LONG_PTR</CODE> first?
Mar 26, 2025
0
1

Why does INVALID_HANDLE_VALUE cast through a LONG_PTR first?

Raymond Chen
Raymond Chen

To ensure that the proper sign extension happens.

We’ll fly you to Atlanta, Texas, and getting to your hotel in Atlanta, Georgia is your problem
A note on the USB-to-PS/2 mouse adapter that came with Microsoft mouse devices
Mar 25, 2025
4
2

A note on the USB-to-PS/2 mouse adapter that came with Microsoft mouse devices

Raymond Chen
Raymond Chen

It's a purely mechanical adapter that relies on smarts in the mouse itself.

On how different Windows ABIs choose how to pass 32-bit values in 64-bit registers
Mar 24, 2025
10
2

On how different Windows ABIs choose how to pass 32-bit values in 64-bit registers

Raymond Chen
Raymond Chen

Surveying the options and looking for commonalities.

The case of the critical section that let multiple threads enter a block of code
What could cause a memory corruption bug to disappear in safe mode?
Mar 20, 2025
4
0

What could cause a memory corruption bug to disappear in safe mode?

Raymond Chen
Raymond Chen

A simplified execution environment means fewer things that you can stumble over.

You can’t simulate keyboard input with PostMessage, revisited
Mar 19, 2025
9
6

You can’t simulate keyboard input with PostMessage, revisited

Raymond Chen
Raymond Chen

If it didn't go through the input system, it only looks like input as much as the app allows itself to be fooled.

Why didn’t Windows 95 setup use a miniature version of Windows 95 as its fallback GUI?
Mar 18, 2025
7
4

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

Raymond Chen
Raymond Chen

Avoiding an interim GUI environment.

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