When you say PlaySpeakerWave do you want to play the wave file through your PC speaker?. Or is PlaySpeakerWave just your sub call?
VB Code:
Public Declare Function sndPlaySound Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
Public Const SND_ASYNC = &H1
Public Const SND_NODEFAULT = &H2
Public Sub PlaySound(Soundname As String)
Call sndPlaySound(Soundname, SND_ASYNC Or SND_NODEFAULT)
End Sub
This is just the basic playing a wave file.
I've just seen your other thread. PlaySpeakerWave is the function at is used in the app someone sent you (soundkey). It's a bad use of a function to play a wave file. Functions should return a value. You don't need anything returning from playing a wave file.
http://www.vbforums.com/showthread.p...hreadid=297901