Marshalling Sample
What is believed to be the correct and safe way to marshal something...
Point p = new Point(10, 10);
IntPtr pnt = Marshal.AllocHGlobal(Marshal.SizeOf(p));
try {
Marshal.StructureToPtr(p, pnt, false);
Point newP = (Point)Marshal.PtrToStructure(pnt, typeof(Point));
} finally {
Marshal.FreeHGlobal(pnt);
}