| Author: Hari 21 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi, Use this code Include this dll Interop.WMPLib.dll
WindowsMediaPlayerClass clas1 = new WindowsMediaPlayerClass(); IWMPMedia Med = clas1.newMedia(@"c:\Test.wmv"); double val =Med.duration; Note that this wont work for .avi files. It will only work for wmv and mp3 files.
|