GetTextMetrics function Null safety gdi32

int GetTextMetrics(
  1. int hdc,
  2. Pointer<TEXTMETRIC> lptm
)

The GetTextMetrics function fills the specified buffer with the metrics for the currently selected font.

BOOL GetTextMetricsW(
  HDC          hdc,
  LPTEXTMETRICW lptm
);

Implementation

int GetTextMetrics(int hdc, Pointer<TEXTMETRIC> lptm) {
  final _GetTextMetrics = _gdi32.lookupFunction<
      Int32 Function(IntPtr hdc, Pointer<TEXTMETRIC> lptm),
      int Function(int hdc, Pointer<TEXTMETRIC> lptm)>('GetTextMetricsW');
  return _GetTextMetrics(hdc, lptm);
}