two sndplaySound(...,...) questions

Hello everyone,

I am using the older sndplaysound("... .wav,", null );

I have two questions for this forum. (1.) The function returns 0 if fail. Does this mean that all return failures will not cause the program to fail. For example, if there is no soundcard is there a return of 0 and a continuation of the program execution? (2.) This function does all the work automatically including closing down when out of scope, and more calls of the sndplaysound are okay?

I am using Visual C++,

Joshua Eirman


The return of 0 is there so you can check if the function ran or failed. You can use the return value to display an error message or just end the program at your discretion.

Most of these answers can be figured out here:

http://msdn.microsoft.com/en-us/library/aa909803.aspx
Topic archived. No new replies allowed.