Easylanguage call C#/JAVA

Questions about MultiCharts and user contributed studies.
steven
Posts: 37
Joined: 07 Jun 2010
Location: china
Has thanked: 2 times

Easylanguage call C#/JAVA

Postby steven » 08 Jun 2010

Is there any way to call C#/JAVA in easylanguage?

Thanks

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Postby Dave Masalov » 08 Jun 2010

Dear steven,

Regarding C#, if it is done in a C# dll with exportable functions, then it is possible. C# have mechanisms to export functions declarations in a dll.

As for JAVA, most likely it can be done only using some sort of adapters.

steven
Posts: 37
Joined: 07 Jun 2010
Location: china
Has thanked: 2 times

Postby steven » 09 Jun 2010

Dear Dave,

Thanks for the reply.
Is there any other way to call C# except DLL with EL?

Regards,
Stv

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Postby Dave Masalov » 30 Jun 2010

Dear steven,

Unfortunately, there is no other way to call C# in EasyLanguage besides a dll file.

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Postby janus » 30 Jun 2010

steven, if you need to run an application outside of MC, all you have to do is build a small DLL stub that executes it. MC can then call the DLL, which in turn calls the .exe. If you need to pass information to the application then that can be done too. If you need to return information back from the application to MC then it may be possible depending on the application. Even if you can, you have to be careful you don't stall MC by waiting for the returned information. To avoid this you can use a multi-threaded DLL stub, where one thread waits for the information to be returned, and the other is called by MC and checks if the information is available or not. If it is then it returns the information back to the study. If it isn't then it returns to the study, possibily with a flag to say the information has not yet been returned, and checks again on the next cycle.


Return to “MultiCharts”