Trouble loading ActiveX control

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Guest

Trouble loading ActiveX control

Post by Guest » Tue Nov 22, 2005 6:16 pm

We are evaluating your product and attempting to run it in conjunction with a C#.NET Windows application that includes the Windows Media Player ActiveX control in a user control. When the form is loaded without Memory Profiler, all is fine. But when the form is loaded with Memory Profiler the following error occurs;

System.Threading.ThreadStateException: Could not instantiate ActiveX control '6bf52a52-394a-11d3-b153-00c04f79faa6' because the current thread is not in a single-threaded apartment.
at System.Windows.Forms.AxHost..ctor(String clsid, Int32 flags)
at System.Windows.Forms.AxHost..ctor(String clsid)
at AxWMPLib.AxWindowsMediaPlayer..ctor()
at VoicePlayer.ucVoicePlayer.InitializeComponent() in c:\projects\mt pro\code\user controls\voiceplayer\ucvoiceplayer.cs:line 291
at VoicePlayer.ucVoicePlayer..ctor() in c:\projects\mt pro\code\user controls\voiceplayer\ucvoiceplayer.cs:line 118

I was unable to find any setting that looked like it had anything to do with threading or ActiveX. Any suggestions would be appreciated.

Thanks,
Greg Swope
Accutype Medical Services, Inc.

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Tue Nov 22, 2005 7:16 pm

This problem may be caused by the fact that the profiler sometimes calls CoInitializeEx from within the profiled process. We have written a workaround for this, but we still have some testing to do. Hopefully it will be included in the next update.

In the meantime, you can try to disable root referee identification. This will change the way CoInitializeEx is called, and might avoid your problem.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Guest

Post by Guest » Tue Nov 22, 2005 8:29 pm

Andreas,

Thanks for the quick reply. I tried the workaround you suggested of disabling root referee identification, but still had the same problem.

If your fix is not available until after the 14 day evaluation is up, any chance we can evaluate again?

Thanks,
Greg Swope
Accutype Medical Services, Inc.

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Tue Nov 22, 2005 9:06 pm

Yes, you can get more evaluation time if you need. Just contact us at support@scitech.se and we will send you a registration key that can be used to extend the evaluation period.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests