示例#1
0
        public static IntPtr ConvertImageToIntPtr(LVBKIMAGE img)
        {
            IntPtr ptr = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(LVBKIMAGE)));

            Marshal.StructureToPtr <LVBKIMAGE>(img, ptr, false);
            return(ptr);
        }
示例#2
0
        public static LVBKIMAGE ConvertIntPtrToImage(IntPtr ptr)
        {
            LVBKIMAGE structure = (LVBKIMAGE)Marshal.PtrToStructure(ptr, typeof(LVBKIMAGE));

            Console.Out.WriteLine((object)structure.path);
            return(structure);
        }
示例#3
0
 public static Bitmap BitmapFromImage(LVBKIMAGE img)
 {
     return(Image.FromHbitmap(img.hbm));
 }