DrawTextEx function Null safety user32

int DrawTextEx(
  1. int hdc,
  2. Pointer<Utf16> lpchText,
  3. int cchText,
  4. Pointer<RECT> lprc,
  5. int format,
  6. Pointer<DRAWTEXTPARAMS> lpdtp
)

The DrawTextEx function draws formatted text in the specified rectangle.

int DrawTextExW(
  HDC              hdc,
  LPWSTR           lpchText,
  int              cchText,
  LPRECT           lprc,
  UINT             format,
  LPDRAWTEXTPARAMS lpdtp
);

Implementation

int DrawTextEx(int hdc, Pointer<Utf16> lpchText, int cchText,
    Pointer<RECT> lprc, int format, Pointer<DRAWTEXTPARAMS> lpdtp) {
  final _DrawTextEx = _user32.lookupFunction<
      Int32 Function(IntPtr hdc, Pointer<Utf16> lpchText, Int32 cchText,
          Pointer<RECT> lprc, Uint32 format, Pointer<DRAWTEXTPARAMS> lpdtp),
      int Function(
          int hdc,
          Pointer<Utf16> lpchText,
          int cchText,
          Pointer<RECT> lprc,
          int format,
          Pointer<DRAWTEXTPARAMS> lpdtp)>('DrawTextExW');
  return _DrawTextEx(hdc, lpchText, cchText, lprc, format, lpdtp);
}