CreateDIBitmap function Null safety gdi32

int CreateDIBitmap (
  1. int hdc,
  2. Pointer<BITMAPINFOHEADER> pbmih,
  3. int flInit,
  4. Pointer<NativeType> pjBits,
  5. Pointer<BITMAPINFO> pbmi,
  6. int iUsage
)

The CreateDIBitmap function creates a compatible bitmap (DDB) from a DIB and, optionally, sets the bitmap bits.

HBITMAP CreateDIBitmap(
  HDC                    hdc,
  const BITMAPINFOHEADER *pbmih,
  DWORD                  flInit,
  const VOID             *pjBits,
  const BITMAPINFO       *pbmi,
  UINT                   iUsage
);

Implementation

int CreateDIBitmap(int hdc, Pointer<BITMAPINFOHEADER> pbmih, int flInit,
    Pointer pjBits, Pointer<BITMAPINFO> pbmi, int iUsage) {
  final _CreateDIBitmap = _gdi32.lookupFunction<
      IntPtr Function(
          IntPtr hdc,
          Pointer<BITMAPINFOHEADER> pbmih,
          Uint32 flInit,
          Pointer pjBits,
          Pointer<BITMAPINFO> pbmi,
          Uint32 iUsage),
      int Function(
          int hdc,
          Pointer<BITMAPINFOHEADER> pbmih,
          int flInit,
          Pointer pjBits,
          Pointer<BITMAPINFO> pbmi,
          int iUsage)>('CreateDIBitmap');
  return _CreateDIBitmap(hdc, pbmih, flInit, pjBits, pbmi, iUsage);
}