Jump to content

Resource UDF $SND_NOWAIT issue

Recommended Posts

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
      $hInstance = _WinAPI_LoadLibraryEx($DLL, $LOAD_LIBRARY_AS_DATAFILE)

    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]


From the resource UDF from zedna.


And i am using this code:


To play the sound.


It plays the sound perfectly fine. However it ignores the $SND_NOWAIT.


What am i doing wrong?

Edited by Melba23
Moved to GH&S
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...