The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

How do I convert a WIC bitmap back to a GDI <CODE>HBITMAP</CODE>?
May 28, 2025
Post comments count 0
Post likes count 0

How do I convert a WIC bitmap back to a GDI HBITMAP?

Raymond Chen
Raymond Chen

You can copy the bits into a DIB section.

What was origin of the code name Redpill for Windows 8 feature lockout?
May 27, 2025
Post comments count 5
Post likes count 1

What was origin of the code name Redpill for Windows 8 feature lockout?

Raymond Chen
Raymond Chen

Pretty obvious, actually.

Why does <CODE>Enum­Process­Modules</CODE> report no modules on a process that was created suspended?
May 26, 2025
Post comments count 2
Post likes count 0

Why does Enum­Process­Modules report no modules on a process that was created suspended?

Raymond Chen
Raymond Chen

There are no modules yet because you didn't give them a chance to load.

How can I detect if one of my helper processes is launching child processes?
May 23, 2025
Post comments count 5
Post likes count 3

How can I detect if one of my helper processes is launching child processes?

Raymond Chen
Raymond Chen

You can ask a job object to keep track for you.

How can I create a window the size of the screen without it being treated as a fullscreen window?
May 22, 2025
Post comments count 4
Post likes count 3

How can I create a window the size of the screen without it being treated as a fullscreen window?

Raymond Chen
Raymond Chen

You can declare that you aren't rude.

Silly parlor tricks: Promoting a 32-bit value to a 64-bit value when you don’t care about garbage in the upper bits
May 21, 2025
Post comments count 5
Post likes count 2

Silly parlor tricks: Promoting a 32-bit value to a 64-bit value when you don’t care about garbage in the upper bits

Raymond Chen
Raymond Chen

Inline assembly that doesn't do anything.

Why does Windows report my processor speed twice, with slightly different values?
May 20, 2025
Post comments count 6
Post likes count 2

Why does Windows report my processor speed twice, with slightly different values?

Raymond Chen
Raymond Chen

One is calculated. The other is self-promotion.

Secret passages on Microsoft main campus, episode 3
May 19, 2025
Post comments count 1
Post likes count 1

Secret passages on Microsoft main campus, episode 3

Raymond Chen
Raymond Chen

Another covered passage between buildings.

What’s with the weird <CODE>wReserved</CODE> value at the start of the <CODE>DECIMAL</CODE> structure?
May 16, 2025
Post comments count 7
Post likes count 2

What’s with the weird wReserved value at the start of the DECIMAL structure?

Raymond Chen
Raymond Chen

It's where the discriminant goes when the DECIMAL is put "inside" a VARIANT.