You can use the mci functions in winmm.dll You need to look at the Platform SDK Multimedia documentation. I did exactly what you describe in C# 2.0. I built a BasePlayer class and then subclassed WavePlayer, CDPlayer etc. I don't have code handy but it just boils down to doing a DllImport of the mciSendString function and sending the appropriate string (command) to open, play, pause, seek, etc. You can control audio files, avi's, CDs, DVD, VCR, etc. mci has been around a long time but once you build your classes it all works very well.
Ray
www.opmdforum.com
|