private _CreateDIBSectionIntPtr ( |
||
hdc | ||
bitmapInfo | [ | |
iUsage | int | |
ppvBits | [ | |
hSection | ||
dwOffset | int | |
return |
public static SafeHBITMAP CreateDIBSection(SafeDC hdc, ref BITMAPINFO bitmapInfo, out IntPtr ppvBits, IntPtr hSection, int dwOffset) { SafeHBITMAP safeHBITMAP; if (hdc == null) { safeHBITMAP = NativeMethods._CreateDIBSectionIntPtr(IntPtr.Zero, ref bitmapInfo, 0, out ppvBits, hSection, dwOffset); } else { safeHBITMAP = NativeMethods._CreateDIBSection(hdc, ref bitmapInfo, 0, out ppvBits, hSection, dwOffset); } if (safeHBITMAP.IsInvalid) { HRESULT.ThrowLastError(); } return(safeHBITMAP); }