Exception when dll loaded by Host Application

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Vivek
Newbie
Newbie
Posts: 9
Joined: Tue Mar 10, 2009 12:00 am
Contact:

Exception when dll loaded by Host Application

Post by Vivek » Sun Mar 22, 2009 1:59 pm

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?.

Marc
Site Admin
Site Admin
Posts: 1260
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Mon Mar 23, 2009 4:45 pm

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
Steema Support

Post Reply