DrawText function Null safety user32

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

The DrawText function draws formatted text in the specified rectangle. It formats the text according to the specified method (expanding tabs, justifying characters, breaking lines, and so forth).

int DrawTextW(
  HDC     hdc,
  LPCWSTR lpchText,
  int     cchText,
  LPRECT  lprc,
  UINT    format
);

Implementation

int DrawText(int hdc, Pointer<Utf16> lpchText, int cchText, Pointer<RECT> lprc,
    int format) {
  final _DrawText = _user32.lookupFunction<
      Int32 Function(IntPtr hdc, Pointer<Utf16> lpchText, Int32 cchText,
          Pointer<RECT> lprc, Uint32 format),
      int Function(int hdc, Pointer<Utf16> lpchText, int cchText,
          Pointer<RECT> lprc, int format)>('DrawTextW');
  return _DrawText(hdc, lpchText, cchText, lprc, format);
}