Hi all. I'm currently playing around with the PlaySound API in windows.h, with difficulty lol. If anyone out there can gimme a hand to successfully play a sound file stored on my PC with this API, or by another means, that would be kewl. Thanks in advance.
Just in case anyone else has the same problem, I thought i'd post the solution. The above code is PERFECT, nothing wrong with it at all. You dont have to add any other dll's or include any other headers. Just go to project > project options > parameters and type "-lwinmm" in the LINKER section. As far as I have rationalized it (which may or may not be true lol), this links the winmm.lib library to the project, so that the PlaySound function (which is located in windows.h) may successfully execute.