PlaySound function Null safety winmm
The PlaySound function plays a sound specified by the given file name, resource, or system event.
BOOL PlaySoundW(
LPCTSTR pszSound,
HMODULE hmod,
DWORD fdwSound);
Implementation
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);
}