View Complete Post
On creating media player control in my winforms whose main() function is marked as mtathread... i get below error ActiveX control '6bf52a52-394a-11d3-b153-00c04f79faa6' cannot be instantiated because the current thread is not in a single-threaded apartment.
But I dont want to change my threading model as some other activex controls are involved...
First of all why it did crash... this article from Jeff Prosise says "if an MTA thread creates a ThreadingModel=None or ThreadingModel=Apartment object, calls from that thread will be marshaled from the MTA to the object's STA." http://www.codeguru.com/cpp/com-tech/activex/apts/article.php/c5529
Why marshaling didnt happen and instead app crashes when the thread creating com object is .NET thread?
I am just creating the media player control not even operating with multiple threads...
I am creating media player control from .net winforms whose main is marked as [MTAThread]... thats all I see a crash... why instantiation is crashes... (atleast I should be able to create and later if control crashes because of operating play(), pause()
from multiple threads it makes sense)