public void CopyImageAndDoSth()
 {
     _safeHandleCopy = SafeImageHandleApi.CopyImage(_safeHandle, 0, 0, 0, 0x00000001);
     DoStuff();
 }
        public SafeImageHandleClient(string path)
        {
            Bitmap myBitmap = new Bitmap(path);

            _safeHandle = new SafeImageHandle(myBitmap.GetHbitmap());
        }
 public static extern SafeImageHandle CopyImage(SafeImageHandle h, int type, int cx, int cy, int flags);
 public SafeImageHandleClient(IntPtr handle)
 {
     _safeHandle = new SafeImageHandle(handle);
 }
 public extern static bool DeleteObject(SafeImageHandle handle);