The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Aug 26, 2015
Post comments count 0
Post likes count 1

Rules can exist not because there’s a problem, but in order to prevent future problems

Raymond Chen

Not constraining future optimizations.

Aug 25, 2015
Post comments count 0
Post likes count 1

Microspeak: DRI, the designated response individual

Raymond Chen

The first line of defense.

Aug 24, 2015
Post comments count 0
Post likes count 1

Insightful graph: The ship date predictor

Raymond Chen

Factor of two (and a little).

Aug 21, 2015
Post comments count 0
Post likes count 1

Handy delegate shortcut hides important details: The hidden delegate

Raymond Chen

Sit. Stay.

Aug 20, 2015
Post comments count 0
Post likes count 1

I saw a pinvoke signature that passed a UInt64 instead of a FILETIME, what’s up with that?

Raymond Chen

Stricter than necessary, but that's okay.

Aug 19, 2015
Post comments count 0
Post likes count 1

If you are going to call Marshal.GetLastWin32Error, the function whose error you’re retrieving had better be the one called most recently

Raymond Chen

Watch out for functions called behind your back.

Aug 18, 2015
Post comments count 0
Post likes count 1

If you are going to call Marshal.GetLastWin32Error, the function whose error you’re retrieving had better have SetLastError=true

Raymond Chen

Or it won't get anything.

Aug 17, 2015
Post comments count 0
Post likes count 1

p/invoke gotcha: C++ bool is not Win32 BOOLEAN is not UnmanagedType.Bool

Raymond Chen

Watch the sizes.

Aug 14, 2015
Post comments count 0
Post likes count 1

Windows started picking up the really big pieces of TerminateThread garbage on the sidewalk, but it’s still garbage on the sidewalk

Raymond Chen

So stop throwing garbage on the sidewalk.