I'm trying to develop indicator which gets the data from external sources. For this purposes I've got C++/CLI dll with some interface which do all the job. Now I want to call this DLL from the NT indicator code. Here how I'm doing it:
[DllImport("DarkMindConnect.dll")]
public static extern int DarkMindInit([MarshalAs(UnmanagedType.LPStr)]string host, [MarshalAs(UnmanagedType.LPStr)]string accountKey, [MarshalAs(UnmanagedType.LPStr)]string folder);
......
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
Overlay = false;
[B]int result = DarkMindInit(Host, AccountKey, Folder);[/B]
Print("DarkMindInit: " + result);
}

Comment