Beep function Null safety kernel32

int Beep (
  1. int dwFreq,
  2. int dwDuration

Generates simple tones on the speaker. The function is synchronous; it performs an alertable wait and does not return control to its caller until the sound finishes.

BOOL Beep(
  DWORD dwFreq,
  DWORD dwDuration


int Beep(int dwFreq, int dwDuration) {
  final _Beep = _kernel32.lookupFunction<
      Int32 Function(Uint32 dwFreq, Uint32 dwDuration),
      int Function(int dwFreq, int dwDuration)>('Beep');
  return _Beep(dwFreq, dwDuration);