How can u Play a MP3 file with C#

  • Thread starter Thread starter Paul
  • Start date Start date
You can use media player to play the mp3 file. To invoke media player from
within an existing application you can use one of two API's, both of which
can be reached using P/Invoke. First of, you can P/Invoke the ShellExecuteEx
API in which you specify the mp3 file to play. By default this file will be
opened with the associated application, which in the default situation is
media player. You can also P/Invoke CreateProcess, specifying media player
with the mp3 file as argument. You can make use of OpenNETCF.org's WinAPI
library (http://www.opennetcf.org/winapi.asp) to easily P/Invoke to both
API's.
 
Back
Top