The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Don’t name your header file <CODE>security.h</CODE> either
May 24, 2023
Post comments count 4
Post likes count 3

Don’t name your header file security.h either

Raymond Chen
Raymond Chen

You may be overriding an SDK header by mistake.

On creating (and using) a transforming iterator
May 23, 2023
Post comments count 4
Post likes count 3

On creating (and using) a transforming iterator

Raymond Chen
Raymond Chen

It lets you change the thing being iterated over, on the fly.

Speeding up the insertion of a sorted (or mostly-sorted) key list into a <CODE>std::map</CODE> or other ordered associative container
May 22, 2023
Post comments count 1
Post likes count 3

Speeding up the insertion of a sorted (or mostly-sorted) key list into a std::map or other ordered associative container

Raymond Chen
Raymond Chen

Provide a hint for the location of the next item.

On catching exceptions in PPL tasks
May 19, 2023
Post comments count 0
Post likes count 0

On catching exceptions in PPL tasks

Raymond Chen
Raymond Chen

You also have to catch the exception when it comes out the end of the task chain.

What is the opposite of <CODE>LVM_SORTITEMS</CODE>?
May 18, 2023
Post comments count 3
Post likes count 1

What is the opposite of LVM_SORTITEMS?

Raymond Chen
Raymond Chen

How can you unring the bell?

How do I free the pointers returned by functions like <CODE>Get­Token­Information</CODE>?
May 17, 2023
Post comments count 2
Post likes count 1

How do I free the pointers returned by functions like Get­Token­Information?

Raymond Chen
Raymond Chen

They are all pointers back into the main memory block.

It appears that I’ve never made a complete visit to the Pacific Northwest
May 16, 2023
Post comments count 6
Post likes count 0

It appears that I’ve never made a complete visit to the Pacific Northwest

Raymond Chen
Raymond Chen

If the marketing department is to be believed.

Summary of the duck-typing requirements of C++ COM wrappers
May 16, 2023
Post comments count 3
Post likes count 3

Summary of the duck-typing requirements of C++ COM wrappers

Raymond Chen
Raymond Chen

Wrapping up and comparing.

What are the duck-typing requirements of C++/WinRT <CODE>com_ptr</CODE>?
May 15, 2023
Post comments count 1
Post likes count 1

What are the duck-typing requirements of C++/WinRT com_ptr?

Raymond Chen
Raymond Chen

The experiments conclude.