The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Jan 7, 2019
Post comments count 0
Post likes count 1

The GetRegionData function fails if the buffer is allocated on the stack. Is it allergic to stack memory or something?

Raymond Chen

One of the lesser-known ground rules.

Jan 4, 2019
Post comments count 0
Post likes count 1

A trick for keeping an object alive in a C++ lambda while still being able to use the this keyword to refer to it

Raymond Chen

Capture it twice, once for the money, and once for the show.

Jan 3, 2019
Post comments count 0
Post likes count 1

Why am I getting mojibake when I try to create a shell link?

Raymond Chen

Make sure the thing you ask for is the thing you want.

Jan 2, 2019
Post comments count 0
Post likes count 1

How can I prevent a WebView control from opening a browser window?

Raymond Chen

It will check with you first, but you have to be listening.

Jan 1, 2019
Post comments count 0
Post likes count 2

Why does the elevation prompt have only the wallpaper as its background?

Raymond Chen

Caught unprepared.

Dec 31, 2018
Post comments count 0
Post likes count 1

2018 year-end link clearance

Raymond Chen

We made it to the end!

Dec 28, 2018
Post comments count 0
Post likes count 1

The case of the orphaned critical section despite being managed by an RAII type

Raymond Chen

Rolling up the debugging sleeves.

Dec 27, 2018
Post comments count 0
Post likes count 1

SHOpenRegStream does not mix with smart pointers

Raymond Chen

Old school meets new school, again.

Dec 26, 2018
Post comments count 0
Post likes count 1

Don’t forget: std::pair does lexicographical ordering, so you don’t have to

Raymond Chen

Let it do the comparing.