Using Media Player in console app

G

Guest

Hi all,

....trying to instantiate a WMP player in a console, but the code failed in:

using AxWMPLib;
using WMPLib;
....

AxWMPLib.AxWindowsMediaPlayer objPlayer = new AxWMPLib.AxWindowsMediaPlayer();

A first chance exception of type 'System.Threading.ThreadStateException'
occurred in System.Windows.Forms.dll.

Does anyone have a way around this?

Thanks,
DH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top