YerChance Posted January 8, 2017 Posted January 8, 2017 (edited) Hello, this is my first post here. Hopefully i put it in the correct category Alright.. So i copied this function: Func _ResourcePlaySound($ResName, $Flag = 0, $DLL = -1) If $DLL = -1 Then $hInstance = 0 Else $hInstance = _WinAPI_LoadLibraryEx($DLL, $LOAD_LIBRARY_AS_DATAFILE) EndIf Local $ret = DllCall("winmm.dll", "int", "PlaySound", "str", $ResName, "hwnd", $hInstance, "int", BitOr($SND_RESOURCE,$Flag)) If @error Then Return SetError(1, 0, 0) If $DLL <> -1 Then _WinAPI_FreeLibrary($hInstance) If @error Then Return SetError(2, 0, 0) Return $ret[0] EndFunc From the resource UDF from zedna. And i am using this code: _ResourcePlaySound($VAR,$SND_NOWAIT) To play the sound. It plays the sound perfectly fine. However it ignores the $SND_NOWAIT. What am i doing wrong? Edited January 8, 2017 by Melba23 Moved to GH&S
Subz Posted January 8, 2017 Posted January 8, 2017 From https://msdn.microsoft.com/en-us/library/ms712879.aspx SND_NOWAIT If the driver is busy, return immediately without playing the sound. Not sure what exactly you're trying to achieve?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now