title: Playing embedded resource mp3 file
body: <p>I'm trying to play a mp3 file, which is embedded in my c# application (winforms) but with no result. I don't want to create a file from the resource and play it. I've searched the internet but haven't found any working examples. All of them are creating a file from the resource and save it, then pass the file path to mci or wmp. Is it possible to pass a stream?</p>
  
  <pre><code>public partial class Form1 : Form
  {
      [DllImport("winmm.dll")]
      private static extern long mciSendString(string lpstrCommand, StringBuilder lpstrReturnString, int uReturnLength, int hwndCallback);
      public Form1()
      {
          InitializeComponent();
          Stream fileStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("mymp3.mp3");
          string command = "open" + fileStream not filePath + "type MPEGVideo alias MyMp3";
          mciSendString(command, null, 0, 0);
          command = "play MyMp3";
          mciSendString(command, null, 0, 0);
      }
  }
  </code></pre>
  
  <p>Thanks in advance</p>