ExtCreatePen function Null safety gdi32

int ExtCreatePen (
  1. int iPenStyle,
  2. int cWidth,
  3. Pointer<LOGBRUSH> plbrush,
  4. int cStyle,
  5. Pointer<Uint32> pstyle
)

The ExtCreatePen function creates a logical cosmetic or geometric pen that has the specified style, width, and brush attributes.

HPEN ExtCreatePen(
  DWORD          iPenStyle,
  DWORD          cWidth,
  const LOGBRUSH *plbrush,
  DWORD          cStyle,
  const DWORD    *pstyle
);

Implementation

int ExtCreatePen(int iPenStyle, int cWidth, Pointer<LOGBRUSH> plbrush,
    int cStyle, Pointer<Uint32> pstyle) {
  final _ExtCreatePen = _gdi32.lookupFunction<
      IntPtr Function(Uint32 iPenStyle, Uint32 cWidth,
          Pointer<LOGBRUSH> plbrush, Uint32 cStyle, Pointer<Uint32> pstyle),
      int Function(int iPenStyle, int cWidth, Pointer<LOGBRUSH> plbrush,
          int cStyle, Pointer<Uint32> pstyle)>('ExtCreatePen');
  return _ExtCreatePen(iPenStyle, cWidth, plbrush, cStyle, pstyle);
}