|
-
Apr 26th, 2002, 04:52 PM
#1
Thread Starter
Member
sndPlaySound QUICKIE!
Ok, so I try using the sndPlaySound to play a WAV file, and no matter what I do it doesn't work. Here's what I did.
First, and most obvious, I declared the function. 'Tis in a module. Hehe, i said "tis". Anyway, there's nothing worng with it, but just to rehash,
VB Code:
Public Declare Function sndPlaySound _
Lib "winmm.dll" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1
K. So there's what I have down in the module. Here is the code I have to play the sound file:
VB Code:
sndPlaySound "shot1.wav", SND_ASYNC
It's in an If statement, nothing's wrong with the If statement. No matter what I do, whether it be getting rid of that flag or using a different flag, this is what I get:
Can't find DLL entry point sndPlaySound in winmm.dll
So, it doesn't work. What am I doing wrong? Other peoples' projects with sound work, but mine doesn't, and I don't see what's so special about it. HELP!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|