|
-
Oct 28th, 2002, 11:25 AM
#1
Thread Starter
New Member
PlaySound "SND_PURGE" not working on Windows 2K
The SND_PURGE flag for the PlaySound API doesn't seem to purge the .wav file thats currently playing. It works on Win 95, 98. Does anyone know if the SND_PURGE Flag is supported on Windows 2000. Can't seem to find any docs stating this.
-
Oct 28th, 2002, 03:07 PM
#2
I took this from a NewsGroup letter
You seem to be correct. The only way to stop the sound in Win2000
using PlaySound is to start a new silent "sound".
You can try this:
VB Code:
rc = PlaySound("", ByVal 0&, SND_NODEFAULT Or SND_MEMORY)
rc indicates an error (rc = 0) but the sound stops.
From what I've discovered, there is a bug, but not with the API itself, but rather how it works with VB on Windows 2000. From what I've read, if you were writing code in C, and running it on Windows 2000, it would work just fine.
-
Oct 28th, 2002, 03:53 PM
#3
Software Eng.
See if passing a blank filename helps
-
Oct 28th, 2002, 05:13 PM
#4
Thread Starter
New Member
I was using the BLANK .Wav file and it worked just finr. However, after continuous looping files starting and stoping the system seemed to really bog down and eventually come to a halt. I started setting the SND_FILENAME Flag which I believe cured my problem.SND_FILENAME seems to stop the system from searching the registry.
Thanks for the input. VBNull also works as the filename but causes the SystemDefault Sound.
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
|