March 2008 - Posts
One API that seems to be missing from List(Of T) is a BinaryInsert method. Especially since there is already a BinarySearch method. Binary insert is a method for inserting a value into an already sorted list. Since the list is already sorted
Read More...
I've been busy lately and neglected my series on Active Objects . It's been a fairly busy time for me both in and out of work. Enough excuses, back to the fun. With the basic PipeSingleReader class, we now have the last piece necessary to
Read More...
CComObject::CreateInstance is a light weight method for creating instances of COM objects in your code. Unfortunately the design of the API makes it easy to introduce subtle errors into your code. The two problems are it encourages manually ref counting
Read More...
... and to actively guard against yourself. Over the years I've found that I can be my own worst enemy when I code. Part of the problem stems from paranoia Early in my college days, a professor of mine, Jim Greenlee, instilled in me the virtue of paranoid
Read More...
I very excited to announce we recently released a tool I've been working on to MSDN that will greatly help with using PInvoke in managed code. The tool is called the "PInvoke Interop Assistant" and is included as part of a MSDN article on marshalling
Read More...
Previously we discussed a multi-thread safe queue like data structure using locks as an internal synchronization mechanism. This time we'll look at a version requiring no locks. In the previous version, locks were used to synchronize access to an underlying
Read More...
Before we can get to building an Active Object implementation, there are some more primitive structures we need to define. Active Objects live on a separate thread where every call is executed in a serialized fashion on that thread. The next primitive
Read More...