External Dll programing

Questions about MultiCharts and user contributed studies.
randomname
Posts: 22
Joined: 26 Sep 2007

External Dll programing

Postby randomname » 26 Jan 2008

Could you please add support for the following reserved words.

#EVENTS
OnDestroy
#end ;

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 28 Jan 2008

Hello Randomname,

This words are supported in MultiCharts.

Regards.

randomname
Posts: 22
Joined: 26 Sep 2007

Postby randomname » 28 Jan 2008

The following produced errors when compiling

#EVENTS
OnDestroy = EasyLanguageRtlOnDestroy;
#END;

States "Function doesn't declared"

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 29 Jan 2008

Hi randomname,

Try the following:

Code: Select all

external method: "DLLNAME.dll", void, "_OnDestroyHandler";

#EVENTS
   OnDestroy = _OnDestroyHandler;
#END;


Should work.

randomname
Posts: 22
Joined: 26 Sep 2007

Postby randomname » 29 Jan 2008

that worked thanks, with TS you didn't have to implicintly define the function

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 30 Jan 2008

You're welcome randomname.

randomname
Posts: 22
Joined: 26 Sep 2007

Postby randomname » 31 Jan 2008

I am still having problems I get the error prompt

Error in study "My Custom Indicator"

With the text:
The instruction at "0x

I still think it is due to the OnDestroy function call, but not sure.

Any ideas?

randomname
Posts: 22
Joined: 26 Sep 2007

Postby randomname » 01 Feb 2008

Ok well it is working without errors using the following code

external method: "DLLNAME.dll", int, "_OnDestroyHandler", IEasyLanguageObject;

But it creates errors when I use just external instead of external method

Is there suppose to be a difference between the two?
external: "DLLNAME.dll", int, "_OnDestroyHandler", IEasyLanguageObject;


Return to “MultiCharts”