PDA

View Full Version : Unable to find entry point (connecting to a dll)


bboyle1234
08-10-2008, 04:25 AM
Hi, I have created a very simple .dll and saved it on my computer as
C:\ClientTraderConnectionClass.dll.

The code used to create this class is:

namespace ClientTraderConnectionClass
{
public static class StopLosses
{
public static double GetTest()
{
return 10;
}
}
}


I want in indicator inside NinjaTrader to call the "ClientTraderConnectionClass.StopLosses.GetTest()" function, but so far I'm not sure exactly how to do that. Here is the code I have in my indicator, which is throwing the error "Unable to find entry point "GetTest()"

public class StopLosses : Indicator
{
[DllImport("C:/ClientTraderConnectionClass.dll")]
public static extern double GetTest();

protected override void OnBarUpdate()
{
try
{
TestNumber.Set(GetTest());
}
catch(Exception ex)
{
TestNumber.Set(-5);
}
}
}

Can someone please help me setup this function correctly? I have also tried using the line:

TestNumber.Set(ClientTraderConnectionClass.StopLos ses.GetTest()); to no avail.

Thanks in advance,
Ben

NinjaTrader_Dierk
08-10-2008, 04:51 AM
Unfortunately that is beyond what we provide support for. As last resort you could contact a certified NinjaScript consultant: http://www.ninjatrader.com/webnew/partners_onlinetrading_NinjaScript.htm

bboyle1234
08-10-2008, 10:51 AM
Unfortunately that is beyond what we provide support for. As last resort you could contact a certified NinjaScript consultant: http://www.ninjatrader.com/webnew/partners_onlinetrading_NinjaScript.htm

Thanks Dierk, I know that ... am used to reading it from you on this forum... Hoping other developers out there might read the thread and have something to offer :)