C # can access the VLC through the COM layer. The first thing to do is register the axvlc.dll file. Open the cmd window and type:
C:\Windows\System32\regsvr32.exe C:\Program Files (x86)\VideoLAN\VLC\axvlc.dll
You should receive a dialog box confirming the successful registration of your DLL. Open VisualStudio and create a new WinForms project and add a link to the COM COM COM object. Go to cs form file
namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); AXVLC.VLCPlugin2Class p = new AXVLC.VLCPlugin2Class(); p.addTarget("C:\\zk.m4a", null, VLCPlaylistMode.VLCPlayListInsert, 0); p.play(); } } }
Note: VLCPluginClass is deprecated, use VLCPlugin2Class
Dan busha
source share