BrianBZ
22nd January 2010, 17:33
I am trying to write an app in C# to connect to dlls in Baan. I added a reference to baan in my application. I instantiate an object but get the error {"Unable to cast COM object of type 'Baan4.Baan4Class' to interface type 'Baan4.IDispatchBaan4'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00000002-4000-11CE-AAA8-00608C50C597}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."}

This is how I instantiate my object. The bw.exe starts up running fine but I always get that error.

Baan4.Baan4 objBaan = new Baan4.Baan4();

What am I doing wrong?

sgoupil
27th January 2010, 16:29
public void Connect_Baan()
{
try
{
BwCOleAutomationServerClass objBaan = new BwCOleAutomationServerClass();
this.objBaan = objBaan;
}
catch (Exception cat)
{
MessageBox.Show(cat.Message);
}
}

BrianBZ
27th January 2010, 23:27
I updated my baan client and it fixed the issue. Thks