Page 1 of 1

Exception when dll loaded by Host Application

Posted: Sun Mar 22, 2009 1:59 pm
by 13052775
We have an application which uses plug-in concepts. It uses reflection to load the assembly. I have a dll which uses TeeChart for charting purpose. When the EXE tries to load the dll. It throws exception of type initialization fail. I have been thru the forum and found that the main application which uses TeeChart needs to compile by adding the Licx file. But since our EXE(base application) is already in market we cant build it by adding the Licx. Is there any other way?.

Posted: Mon Mar 23, 2009 4:45 pm
by Marc
Hello,

You may use the TChart(object) or Chart(object) overload on first Chart construction in your assembly, passing the assembly itself as argument. License checks will then be limited to the level of the assembly allowing it to be plugged into a container application by reflection without need for license checks at container level.

The technique assumes that your assembly is self-contained and does not pass TeeChart calls to the container (those that might require knowledge of the TeeChart assemblies itself in the container application).

Regards,
Marc Meumann