The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Image
Apr 24, 2026
Post comments count 2
Post likes count 1

Defending against exceptions in a scope_exit RAII type

Image
Raymond Chen

But maybe it's not worth it.

Image
Apr 23, 2026
Post comments count 11
Post likes count 2

Another crash caused by uninstaller code injection into Explorer

Image
Raymond Chen

Inadvertently destroying a staircase while standing on it.

Image
Apr 22, 2026
Post comments count 2
Post likes count 3

Mapping the page tables into memory via the page tables

Image
Raymond Chen

So-called "fractal page mapping".

Image
Apr 21, 2026
Post comments count 28
Post likes count 3

Sure, xor’ing a register with itself is the idiom for zeroing it out, but why not sub?

Image
Raymond Chen

Somehow xor became the most popular version.

Image
Apr 20, 2026
Post comments count 1
Post likes count 3

How did code handle 24-bit-per-pixel formats when using video cards with bank-switched memory?

Image
Raymond Chen

You still have to use aligned accesses, even though the pixels might not be aligned.

Image
Apr 17, 2026
Post comments count 1
Post likes count 4

Forgotten message from the past: LB_INIT­STORAGE

Image
Raymond Chen

Preallocating memory to avoid quadratic behavior.

Image
Apr 16, 2026
Post comments count 9
Post likes count 2

What’s up with window message 0x0091? We’re getting it with unexpected parameters

Image
Raymond Chen

Trespassing on system messages.

Image
Apr 15, 2026
Post comments count 0
Post likes count 2

Why is there a long delay between a thread exiting and the Wait­For­Single­Object returning?

Image
Raymond Chen

Maybe it didn't really exit.

Image
Apr 14, 2026
Post comments count 2
Post likes count 3

Why was there a red telephone at every receptionist desk?

Image
Raymond Chen

Not a direct line to Bill Gates's office.