The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Dec 30, 2024
Post comments count 4
Post likes count 4

How various git diff viewers represent file encoding changes in pull requests

Raymond Chen

The invisible UTF-8 BOM, and sometimes invisible encoding changes.

Dec 27, 2024
Post comments count 4
Post likes count 2

In C++, failure to meet the requirements does not always mean that you fail if you don’t meet the requirements

Raymond Chen

Combining SFINAE/requires, standard layout, and overload resolution.

Dec 26, 2024
Post comments count 8
Post likes count 4

Why are Win32 resources strings bundled at all? And why bundles of 16?

Raymond Chen

Balancing multiple performance factors.

Dec 25, 2024
Post comments count 0
Post likes count 2

How can I check if two GUIDs are equal when they are provided as strings?

Raymond Chen

A customer asked if there was a helper function in the system that accepted two strings and reported whether the s they represent are equal. This is a tricky question, because you first have to decide what "represent" means. There are many ways of representing a as a string. It could be just 32 case-insensitive hexadecimal digits. Or maybe there are internal hyphens to separate the groups. And the whole thing might be enclosed in braces or parentheses. External and interior whitespace might be allowed. Trailing garbage might be accepted (and ignored). And then there's the special format {0x00000000,0x0000,0x00...

Dec 24, 2024
Post comments count 0
Post likes count 3

A design flaw in the Windows 3D Pipes screen saver pointed out by a customer

Raymond Chen

Time-wasting.

Dec 23, 2024
Post comments count 5
Post likes count 2

A common proposed solution to certain categories of IFNDR: Getting the linker to verify identical functions

Raymond Chen

You could do it, but it could cramp your style.

Dec 20, 2024
Post comments count 0
Post likes count 2

How do I register a file type for a scripting language so that users get a warning when they run an untrusted script?

Raymond Chen

Use the FTA_AlwaysUnsafe edit flag.

Dec 19, 2024
Post comments count 7
Post likes count 5

Inside STL: The atomic shared_ptr

Raymond Chen

There's a lock hiding inside the pointer.

Dec 18, 2024
Post comments count 2
Post likes count 1

Is there a way to split the git history of a file or combine the histories of two files without a merge commit?

Raymond Chen

Studying how git recovers history.