RegisterPowerSettingNotification function Null safety user32

int RegisterPowerSettingNotification(
  1. int hRecipient,
  2. Pointer<GUID> PowerSettingGuid,
  3. int Flags
)

Registers the application to receive power setting notifications for the specific power setting event.

HPOWERNOTIFY RegisterPowerSettingNotification(
  HANDLE  hRecipient,
  LPCGUID PowerSettingGuid,
  DWORD   Flags
);

Implementation

int RegisterPowerSettingNotification(
    int hRecipient, Pointer<GUID> PowerSettingGuid, int Flags) {
  final _RegisterPowerSettingNotification = _user32.lookupFunction<
      IntPtr Function(
          IntPtr hRecipient, Pointer<GUID> PowerSettingGuid, Uint32 Flags),
      int Function(int hRecipient, Pointer<GUID> PowerSettingGuid,
          int Flags)>('RegisterPowerSettingNotification');
  return _RegisterPowerSettingNotification(hRecipient, PowerSettingGuid, Flags);
}