I am trying to access the NtDirect functionality from within C# but am not meeting success so far.
I have tried 2 methods;
1) Add a reference to NtDirect.dll from within a C# project. I get the message;
"A reference to 'C:\WINDOWS\System32\NtDirect.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."
2) I tried a direct link from within the source using;
using System.Runtime.InteropServices;
class Test
{
[DllImport( "NTDirect.dll" )]
public extern static int Connected( int showMessage );
public static void Main( string[] args )
{
int connectStatus = Connected( 1 );
}
}
I then get an error message saying;
"Failed to initialize COM library (0x80010106)"
I know that futures_shark says he has been able to get this method to succeed but I haven't. Similarly, including references to NinjaTrader.Client.dll (which I can get to successfully link in) as he suggests does not give access to the NtDirect functions.
Any ideas as to what I'm doing wrong?
many thanks
Comment