C# InvalidActiveXStateException
I'm currently trying to use an ActiveX on my application but i've got a InvalidActiveXStateException and i don't know why :(
Here is my code :
private AgentObjects.IAgentCtlCharacterEx Character;
private AxAgentObjects.AxAgent axAgent1 = new AxAgentObjects.AxAgent();
....
private void lecteur_mp3_Load(object sender, System.EventArgs e)
{
axAgent1.Characters.Load("merlin", (object)Application.StartupPath + "\\chars\\" + "Merlin.acs");
Character = axAgent1.Characters.Character("merlin");
Character.Show(null);
}
Error in on this line but i don't know why :
axAgent1.Characters.Load("merlin", (object)Application.StartupPath + "\\chars\\" + "Merlin.acs");
Any ideas ?
Thanks