The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

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

How is it that WriteProcessMemory succeeds in writing to read-only memory?

Raymond Chen

Because it tries really hard.

Dec 4, 2018
Post comments count 0
Post likes count 0

The plural of Nexus is Nexūs, in case you cared (which you almost certainly don’t)

Raymond Chen

Only for Latin nerds.

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

Why can’t I close windows directly from the Alt+Tab interface in Windows Vista?

Raymond Chen

Elevation and interruption.

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

Choosing error codes based on a really nice #define doesn’t necessarily lead to a readable message to the user

Raymond Chen

Device not ready? What device?

Nov 30, 2018
Post comments count 0
Post likes count 1

Why does Clipboard.SetData put extra junk in the clipboard data? And how can I get it to stop?

Raymond Chen

Strings and things, but you need the things.

Nov 29, 2018
Post comments count 0
Post likes count 1

Taking advantage of the ordering guarantees of the LINQ GroupBy method

Raymond Chen

Sorting and grouping in a particular way.

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

What happens if I mutate a string in a p/invoke?

Raymond Chen

It seems to work, for specific meanings of "seems".

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

Nifty trick: Combining constructor with collection initializer

Raymond Chen

Two great tastes that work great together.