GetMonitorBrightness function Null safety dxva2

int GetMonitorBrightness (
  1. int hMonitor,
  2. Pointer<Uint32> pdwMinimumBrightness,
  3. Pointer<Uint32> pdwCurrentBrightness,
  4. Pointer<Uint32> pdwMaximumBrightness
)

Retrieves a monitor's minimum, maximum, and current brightness settings.

_BOOL GetMonitorBrightness(
  HANDLE  hMonitor,
  LPDWORD pdwMinimumBrightness,
  LPDWORD pdwCurrentBrightness,
  LPDWORD pdwMaximumBrightness
);

Implementation

int GetMonitorBrightness(
    int hMonitor,
    Pointer<Uint32> pdwMinimumBrightness,
    Pointer<Uint32> pdwCurrentBrightness,
    Pointer<Uint32> pdwMaximumBrightness) {
  final _GetMonitorBrightness = _dxva2.lookupFunction<
      Int32 Function(
          IntPtr hMonitor,
          Pointer<Uint32> pdwMinimumBrightness,
          Pointer<Uint32> pdwCurrentBrightness,
          Pointer<Uint32> pdwMaximumBrightness),
      int Function(
          int hMonitor,
          Pointer<Uint32> pdwMinimumBrightness,
          Pointer<Uint32> pdwCurrentBrightness,
          Pointer<Uint32> pdwMaximumBrightness)>('GetMonitorBrightness');
  return _GetMonitorBrightness(hMonitor, pdwMinimumBrightness,
      pdwCurrentBrightness, pdwMaximumBrightness);
}