PlaySound function Null safety winmm

int PlaySound(
  1. Pointer<Utf16> pszSound,
  2. int hmod,
  3. int fdwSound

The PlaySound function plays a sound specified by the given file name, resource, or system event.

BOOL PlaySoundW(
  LPCTSTR pszSound,
  HMODULE hmod,
  DWORD fdwSound);


int PlaySound(Pointer<Utf16> pszSound, int hmod, int fdwSound) {
  final _PlaySound = _winmm.lookupFunction<
      Int32 Function(Pointer<Utf16> pszSound, IntPtr hmod, Uint32 fdwSound),
      int Function(
          Pointer<Utf16> pszSound, int hmod, int fdwSound)>('PlaySoundW');
  return _PlaySound(pszSound, hmod, fdwSound);