The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Inside STL: Waiting for a <CODE>std::atomic<std::shared_ptr<T>></CODE> to change, part 1
Jan 8, 2025
1
0

Inside STL: Waiting for a std::atomic<std::shared_ptr<T>> to change, part 1

Raymond Chen
Raymond Chen

Waiting on a single pointer, but checking for two.

Emergency power resets on Lenovo, HP, Dell, and Acer laptops
Jan 7, 2025
3
3

Emergency power resets on Lenovo, HP, Dell, and Acer laptops

Raymond Chen
Raymond Chen

Looking for the magic button.

How can I tell whether a change to a control was due to the user or due to my program?
Jan 6, 2025
5
0

How can I tell whether a change to a control was due to the user or due to my program?

Raymond Chen
Raymond Chen

You know when it was done by your program because you did it.

Forcing an <CODE>ERROR_<WBR>KEY_<WBR>DELETED</CODE> error when trying to open <CODE>HKEY_<WBR>CURRENT_<WBR>USER\<WBR>Software</CODE>
Jan 3, 2025
1
1

Forcing an ERROR_KEY_DELETED error when trying to open HKEY_CURRENT_USER\Software

Raymond Chen
Raymond Chen

Just an exercise to show that it can be done, even though it's highly unlikely to occur in practice.

Could I be getting <CODE>ERROR_<WBR>KEY_<WBR>DELETED</CODE> for <CODE>HKEY_<WBR>CURRENT_<WBR>USER\<WBR>Software</CODE> when the user logs off?
Jan 2, 2025
1
0

Could I be getting ERROR_KEY_DELETED for HKEY_CURRENT_USER\Software when the user logs off?

Raymond Chen
Raymond Chen

Probably not, but there are some edge cases.

How is it possible to get <CODE>ERROR_<WBR>KEY_<WBR>DELETED</CODE> when I’m <I>creating</I> a key?
Jan 1, 2025
1
0

How is it possible to get ERROR_KEY_DELETED when I’m creating a key?

Raymond Chen
Raymond Chen

The key that got deleted is not the one you are trying to create.

2024 year-end link clearance
Dec 31, 2024
5
2

2024 year-end link clearance

Raymond Chen
Raymond Chen

The cycle completes.

Making sure the Microsoft Visual C++ compiler chooses the right source encoding
Dec 31, 2024
4
3

Making sure the Microsoft Visual C++ compiler chooses the right source encoding

Raymond Chen
Raymond Chen

Making sure the file and settings are set correctly.