The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Feb 9, 2015
Post comments count 0
Post likes count 1

Using thread pool cleanup groups to clean up many things at once

Raymond Chen

Take out the whole group.

Feb 6, 2015
Post comments count 0
Post likes count 1

Use GFlags to catch the silent killer (silent but deadly)

Raymond Chen

Silent Process Exit.

Feb 5, 2015
Post comments count 0
Post likes count 1

The SuspendThread function suspends a thread, but it does so asynchronously

Raymond Chen

Yes, I heard you, but I'm kind of busy right now.

Feb 4, 2015
Post comments count 0
Post likes count 1

If you wonder why a function can't be found, one thing to check is whether the function exists in the first place

Raymond Chen

One of my colleagues was frustrated trying to get some code to build. "Is there something strange about linking variadic functions? Because I keep getting an unresolved external error for the function, but if I move the function definition to the declaration point, then everything works fine." "With the above code, the linker complains that cannot be found. But if I move the implementation of to the top of the file, then everything builds fine." "I tried putting an explicit calling convention in the declaration, I tried using , nothing seems to help." We looked at the resulting object file and observed...

Feb 3, 2015
Post comments count 0
Post likes count 1

Another way to make sure nobody sends you feedback

Raymond Chen

Boing.

Feb 2, 2015
Post comments count 0
Post likes count 1

Customizing item enumeration with IShellItem, the old-fashioned way

Raymond Chen

Driving it manually.

Jan 30, 2015
Post comments count 0
Post likes count 1

Got errands? Now is the time

Raymond Chen

Everybody else is watching the game.

Jan 30, 2015
Post comments count 0
Post likes count 3

Creating a shared memory block that can grow in size

Raymond Chen

The SEC_RESERVE flag.

Jan 29, 2015
Post comments count 0
Post likes count 1

Color-aware ClearType requires access to fixed background pixels, which is a problem if you don't know what the background pixels are, or if they aren't fixed

Raymond Chen

ClearType is a technology that blends text pixels with background pixels with the goal of reducing visual artifacts during text rendering.¹ If you go for the full-meal version of ClearType, it uses knowledge about the physical properties of LCD screens in order to carry out its work. Some time ago, I noted one catch with this model, which is that overdraw gives the ClearType algorithm the wrong background pixels. Another gotcha is that if you don't know what the background pixels are at all, then you can't use ClearType. For example, you might be rendering a semi-transparent bitmap that will be drawn on to...