When I call ShowProgram(1) my application hangs. I'm wondering if this is a thread affinity issue. The ShowProgram() call is likely NOT being called on the same thread that the MCAutomationClass object is being created on.
When I call ShowProgram(1) immediately after getting a reference to the COM object, ShowProgram(1) works fine, but when I call it later (from another thread) it locks up.
I tried both of the following and they both result in the ShowProgram() method not returning, and the MC UI locks up (but it will continue to play music).
_mediaCenter.ShowProgram(1)
// Also tried:
Type t = _mediaCenter.GetType();
t.InvokeMember("ShowProgram", System.Reflection.BindingFlags.InvokeMethod, null, _mediaCenter, new object[1] { (int)1 });
I an not running this from a windows form, so I can not use Control.Invoke() to tun on the right thread.
Johnny