GetDpiForMonitor function Null safety shcore

int GetDpiForMonitor(
  1. int hmonitor,
  2. int dpiType,
  3. Pointer<Uint32> dpiX,
  4. Pointer<Uint32> dpiY
)

Queries the dots per inch (dpi) of a display.

HRESULT GetDpiForMonitor(
  HMONITOR         hmonitor,
  MONITOR_DPI_TYPE dpiType,
  UINT             *dpiX,
  UINT             *dpiY
  );

Implementation

int GetDpiForMonitor(
    int hmonitor, int dpiType, Pointer<Uint32> dpiX, Pointer<Uint32> dpiY) {
  final _GetDpiForMonitor = _shcore.lookupFunction<
      Int32 Function(IntPtr hmonitor, Uint32 dpiType, Pointer<Uint32> dpiX,
          Pointer<Uint32> dpiY),
      int Function(int hmonitor, int dpiType, Pointer<Uint32> dpiX,
          Pointer<Uint32> dpiY)>('GetDpiForMonitor');
  return _GetDpiForMonitor(hmonitor, dpiType, dpiX, dpiY);
}