I am trying to control MediaMonkey from an external program for further use
(remote controlling f.e.)
I started to write some code, but when I execute it AND MediaMonkey
is already started, I get a COMException like this:
Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80080005
followed up by a NullReference Exception.
If MediaMonkey is NOT already started, the program starts up and my program is working.
This is my C# code:
Code: Select all
public class CMediaMonkeyManager
{
private SongsDB.SDBApplication m_SDBApplication;
public CMediaMonkeyManager()
{
this.initialize();
}
private void initialize()
{
this.initializeMediaMonkey();
}
private void initializeMediaMonkey()
{
try
{
this.m_SDBApplication = new SongsDB.SDBApplication();
}
catch (System.Runtime.InteropServices.COMException ex)
{
MessageBox.Show(ex.Message);
}
}
}
Greetings