public virtual int CreateBitmapFromWicBitmap(
            IWICBitmapSource wicBitmapSource,
            ref D2D1_BITMAP_PROPERTIES1 bitmapProperties,
            out ID2D1Bitmap1 bitmap
            )
        {
            var fp = GetFunctionPointer(58);

            if (m_CreateBitmapFromWicBitmapFunc == null)
            {
                m_CreateBitmapFromWicBitmapFunc = (CreateBitmapFromWicBitmapFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateBitmapFromWicBitmapFunc));
            }
            bitmap = new ID2D1Bitmap1();
            return(m_CreateBitmapFromWicBitmapFunc(m_ptr, wicBitmapSource != null ? wicBitmapSource.Ptr : IntPtr.Zero, ref bitmapProperties, out bitmap.PtrForNew));
        }
        public virtual int CreateBitmapFromDxgiSurface(
            IDXGISurface surface,
            ref D2D1_BITMAP_PROPERTIES1 bitmapProperties,
            out ID2D1Bitmap1 bitmap
            )
        {
            var fp = GetFunctionPointer(62);

            if (m_CreateBitmapFromDxgiSurfaceFunc == null)
            {
                m_CreateBitmapFromDxgiSurfaceFunc = (CreateBitmapFromDxgiSurfaceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateBitmapFromDxgiSurfaceFunc));
            }
            bitmap = new ID2D1Bitmap1();
            return(m_CreateBitmapFromDxgiSurfaceFunc(m_ptr, surface != null ? surface.Ptr : IntPtr.Zero, ref bitmapProperties, out bitmap.PtrForNew));
        }
        public virtual int CreateBitmap(
            D2D_SIZE_U size,
            IntPtr sourceData,
            uint pitch,
            ref D2D1_BITMAP_PROPERTIES1 bitmapProperties,
            out ID2D1Bitmap1 bitmap
            )
        {
            var fp = GetFunctionPointer(57);

            if (m_CreateBitmapFunc == null)
            {
                m_CreateBitmapFunc = (CreateBitmapFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateBitmapFunc));
            }
            bitmap = new ID2D1Bitmap1();
            return(m_CreateBitmapFunc(m_ptr, size, sourceData, pitch, ref bitmapProperties, out bitmap.PtrForNew));
        }