The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Why does C++ think my class is copy-constructible when it can’t be copy-constructed?
Jun 6, 2025
Post comments count 0
Post likes count 0

Why does C++ think my class is copy-constructible when it can’t be copy-constructed?

Raymond Chen
Raymond Chen

You said that you had a copy constructor, even though it can't be compiled.

Why do some Windows functions fail if I pass an unaligned Unicode string?
Jun 5, 2025
Post comments count 9
Post likes count 1

Why do some Windows functions fail if I pass an unaligned Unicode string?

Raymond Chen
Raymond Chen

Well, if you don't align it, then you've already broken the rules.

Riffing on a typo in the name of the opera <I>Turandot</I>
Jun 4, 2025
Post comments count 2
Post likes count 0

Riffing on a typo in the name of the opera Turandot

Raymond Chen
Raymond Chen

On the dot.

How can I programmatically find the network path by which a folder has been shared?
Jun 4, 2025
Post comments count 0
Post likes count 0

How can I programmatically find the network path by which a folder has been shared?

Raymond Chen
Raymond Chen

There is no direct query. You'll have to infer it.

The symbolism of the magnifying glass is not universal
Jun 3, 2025
Post comments count 8
Post likes count 4

The symbolism of the magnifying glass is not universal

Raymond Chen
Raymond Chen

Just making things bigger?

Stating the obvious about debugging an invalid parameter error when freeing memory
Jun 2, 2025
Post comments count 1
Post likes count 1

Stating the obvious about debugging an invalid parameter error when freeing memory

Raymond Chen
Raymond Chen

Writing it down for posterity.

Using an oracle to see where your code is producing the wrong output
May 30, 2025
Post comments count 5
Post likes count 0

Using an oracle to see where your code is producing the wrong output

Raymond Chen
Raymond Chen

If there is a reference implementation, then use it as a check.

The case of creating new instances when you wanted to use the same one
May 29, 2025
Post comments count 6
Post likes count 5

The case of creating new instances when you wanted to use the same one

Raymond Chen
Raymond Chen

C++ language backward compatibility makes legal what you had hoped wasn't.

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

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.