private IntPtr HandleFromBitmap(Frame frame, bool andMask)
{
// By default we use the data straight from the frame.
byte[] data = frame.Data;
if (andMask)
{
//TODO: this could be slow.
// Create a new image that we will copy the pixels to, leaving the masked pixels black.
DotGNU.Images.Image newImage = new DotGNU.Images.Image(frame.Width, frame.Height, frame.PixelFormat);

ilrun throws an exception if you run a simple Windows.Forms application that includes nothing but a explicit icon for the form (compiled by Visual Studio 2003 .NET).
I do not know if this error occurs if you compile the app wit cscc or running ilrun on other platforms.