C# Dll  [SOLVED]

Questions about MultiCharts and user contributed studies.
tony95
Posts: 20
Joined: 10 Sep 2012
Has thanked: 4 times
Been thanked: 2 times

C# Dll

Postby tony95 » 13 Sep 2012

I have created a C# dll and MC8 64 seems to find the dll but can't find the function. Is it possible to call a C# dll or does it have to be C++. If it C# can be used then what do I need to do to reference the function. I tried to just use the function name but do I need to reference the class that it is in?

Code: Select all

namespace MCData
{
public class MCData
{
public static void testdll(string sdata)
{
MessageBox.Show(sdata);
}
}
}

Code: Select all

DefineDLLFunc: "MCData.dll", void, "MCData_testdll", LPSTR;

if LastBarOnChart then
begin
MCData_testdll("Hello");
end;

Dru
Posts: 107
Joined: 28 Aug 2007
Has thanked: 4 times
Been thanked: 171 times

Re: C# Dll  [SOLVED]

Postby Dru » 14 Sep 2012

I have created a C# dll and MC8 64 seems to find the dll but can't find the function.
viewtopic.php?f=1&t=8498#p51649

tony95
Posts: 20
Joined: 10 Sep 2012
Has thanked: 4 times
Been thanked: 2 times

Re: C# Dll

Postby tony95 » 14 Sep 2012

Thank you. I was able to target the 64 bit platform and .Net 3.5 and got this working in no time. I was all over this formum last night and did not see the post that you referenced. I was trying to do this from scratch and it was getting a little cumbersome. That is a wonderful sample project; just has the bare necessities. Thanks again.


Return to “MultiCharts”