Exemplo n.º 1
0
 public static Standard.SafeHBITMAP CreateDIBSection(Standard.SafeDC hdc, ref Standard.BITMAPINFO bitmapInfo, out IntPtr ppvBits, IntPtr hSection, int dwOffset)
 {
     Standard.SafeHBITMAP ehbitmap = null;
     if (hdc == null)
     {
         ehbitmap = _CreateDIBSectionIntPtr(IntPtr.Zero, ref bitmapInfo, 0, out ppvBits, hSection, dwOffset);
     }
     else
     {
         ehbitmap = _CreateDIBSection(hdc, ref bitmapInfo, 0, out ppvBits, hSection, dwOffset);
     }
     if (ehbitmap.IsInvalid)
     {
         Standard.HRESULT.ThrowLastError();
     }
     return(ehbitmap);
 }
Exemplo n.º 2
0
 private static extern Standard.SafeHBITMAP _CreateDIBSectionIntPtr(IntPtr hdc, [In] ref Standard.BITMAPINFO bitmapInfo, int iUsage, out IntPtr ppvBits, IntPtr hSection, int dwOffset);