The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Feb 29, 2016
Post comments count 0
Post likes count 1

How can I get the original shortcut target path with environment variables unexpanded?

Raymond Chen

You'll have to dig into the data list.

Feb 26, 2016
Post comments count 0
Post likes count 1

Changing a loop into a promise or task chain

Raymond Chen

Crack open your textbooks.

Feb 25, 2016
Post comments count 0
Post likes count 1

How do I preload a chunk of memory into a memory-mapped file?

Raymond Chen

PrefetchVirtualMemory will do this.

Feb 24, 2016
Post comments count 0
Post likes count 1

A static_cast is not always just a pointer adjustment

Raymond Chen

That null pointer thingie.

Feb 23, 2016
Post comments count 0
Post likes count 1

Why does the date disappear from my taskbar, sometimes?

Raymond Chen

Because there's no room for it.

Feb 22, 2016
Post comments count 0
Post likes count 2

Finding the shortest binary string in a given interval

Raymond Chen

Narrowing in.

Feb 19, 2016
Post comments count 0
Post likes count 1

When I try to calculate a performance counter manually, the answer is off by a factor of 100

Raymond Chen

Because it's a percentage.

Feb 18, 2016
Post comments count 0
Post likes count 1

Nasty gotcha: VarCmp vs VariantCompare

Raymond Chen

Similar names, different return values.

Feb 17, 2016
Post comments count 0
Post likes count 1

Don’t just grab the foreground window and host UI on it, redux

Raymond Chen

Oops, it's not there any more.