I'm trying to execute some CAPL functions in a specific CANoe Configuration through the CANoe-COM server in C#. But I'm running into errors.
Here, I'm declaring objects of two classes in the CANoe-COM server : Application(to open a CANoe Configuration) and CAPLFunction(to run some CAPL functions on the Configuration,say,open a panel), on the press of a button in a simple Windows Form. The code is as follows:
private void button1_Click(object sender, EventArgs e)
{
CANoe.Application CANoe_big = new CANoe.Application();
CANoe_big.Open(@"All_neu.cfg");
CANoe.CAPLFunction Neu = new CANoe.CAPLFunction();
}
When I'm typing out these functions into Visual Studio, there are no errors indicated. Even on running the program, the Form does show, and on clicking the button, the configuration "All_Neu.cfg" also opens. But after that, the system's throwing this error : "Class not registered, HRESULT:REGDB_E_CLASSNOTREG". And it's highlighting the line declaring the CAPLFunction object while throwing the error.
Which is weird, because there should be no problems,right? I mean, the CANoe configuration is opening correctly, so the CANoe-COM server is alive and kicking.
In fact, I have noticed that any object of literally ANY other class in the COM server,like Bus or Write, is resulting in the same error. The configuration does open, but after that, nothing.
Any ideas as to why this is happening?