Using Media Player in console app

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Back
Top