title: C++ Winmm PlaySound API Returning False And Not Playing Sound
body: <p>No compiler issues, No linker issues, all that happens when this program is ran the PlaySound function returns FALSE and doesn't play any sound at all,</p>
  <p><a href="https://media.discordapp.net/attachments/670195970226651140/852503334505676820/unknown.png" rel="nofollow noreferrer">https://media.discordapp.net/attachments/670195970226651140/852503334505676820/unknown.png</a></p>
  <p>As seen in the figure image above the directory is perfectly fine, I've ran this program on both Release, and Debug, Any help would be very much appreciated, the code is below,</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;Windows.h&gt;
  #include &lt;fstream&gt;
  #pragma comment(lib, &quot;winmm.lib&quot;)
  int main()
  {
      std::ifstream ThisFile;
      ThisFile.open(&quot;S:\\Visual Studio Projects\\KB\\A\\Test.wav&quot;);
      if (ThisFile.is_open())
      {
          std::cout &lt;&lt; &quot;std::ifstream Success!&quot; &lt;&lt; std::endl;
      }
      else
      {
          std::cout &lt;&lt; &quot;std::ifstream Failure!&quot; &lt;&lt; std::endl;
      }
      std::cout &lt;&lt; &quot;Begin Sound&quot; &lt;&lt; std::endl;
      BOOL PlaySoundReturn = PlaySound(L&quot;S:\\Visual Studio Projects\\KB\\A\\Test.wav&quot;, NULL, SND_SYNC | SND_FILENAME | SND_NODEFAULT);
      if (PlaySoundReturn == 0)
      {
          std::cout &lt;&lt; &quot;Failed!&quot; &lt;&lt; std::endl;
      }
      else
      {
          std::cout &lt;&lt; &quot;Success!&quot; &lt;&lt; std::endl;
      }
      std::cin.get();
      return 0;
  }
  </code></pre>