Process Windows Messages in your WPF application

  I have some code that attaches and injects code into a target application (like Visual Studio or IE) to examine its memory use. In order to do that, my code freezes the target.   I wanted my application to respond to WM_QUERYENDSESSION so that when the user is shutting down, it unfreezes the target,…


Be careful about nothing in managed code

  Here’s a pattern of code use I’ve seen in a few places. There’s a function DeserializeList that returns an array of various sizes, depending on the input. This code can be called to deserialize (rehydrate) an object from a stream. For example, an XML deserializer might create an XML node from a binary stream….