News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Invoke PlaySound not working in win2k, xp is fine

Started by gavin, October 25, 2005, 07:28:06 PM

Previous topic - Next topic

gavin

I moved from windows xp to win2k sp4.


Invoke PlaySound, ADDR sound, NULL, SND_FILENAME or SND_ASYNC or SND_LOOP


I've searched google before i posted and have not come up with anything.

Thanks for any help.

Gavin

PBrennick

The GeneSys Project is available from:
The Repository or My crappy website

Tedd

Make sure "ADDR sound" points to a valid filename, and one that will be found in the current path. Also, the wave file shouldn't be too big. And this function isn't available on earlier versions of windows


From http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp:
QuoteThe sound specified by pszSound must fit into available physical memory and be playable by an installed waveform-audio device driver. PlaySound searches the following directories for sound files: the current directory; the Windows directory; the Windows system directory; directories listed in the PATH environment variable; and the list of directories mapped in a network. For more information about the directory search order, see the documentation for the OpenFile function.

If it cannot find the specified sound, PlaySound uses the default system event sound entry instead. If the function can find neither the system default entry nor the default sound, it makes no sound and returns FALSE.

Windows 95/98/Me: PlaySoundW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application
No snowflake in an avalanche feels responsible.