PDA

View Full Version : C++ and the dll api (MFC)


ryork
11-01-2010, 11:14 PM
So maybe I'm missing something but were is the .h file and the lib associated wit the dll provided. I'm an full time embedded c/c++ programmer I don't code alot in windows so maybe I'm missing something.

I'm planning on getting my feet wet on a MFC application is there a way to link to the dll without a lib? If so what about the .h?

Thanks in advance,

RY

NinjaTrader_Bertrand
11-02-2010, 04:18 AM
RY, welcome to our forums - I'm sorry I'm not sure I follow which files you're looking for - an overview over the AT interface can be found here - http://www.ninjatrader-support.com/HelpGuideV6/UnderstandingTheConcept.html

ryork
11-02-2010, 05:17 AM
There is not function definitions, a .h file. I want to write a MFC app that links to the dll.

NinjaTrader_Bertrand
11-02-2010, 05:20 AM
Correct, there's unfortunately no such file, the list of functions for NTDirect can be seen here -

http://www.ninjatrader-support.com/HelpGuideV6/Functions2.html

ryork
11-04-2010, 07:18 PM
Yes, I can see the function defs. But there is not a .lib to link to!!!!

How do you compile and link to the NTDirect.dll in a MFC or any c++ project?

I have never used or heard of an API that did not provide the proper .lib to match the .dll.

RY

MXASJ
11-04-2010, 07:49 PM
http://support.microsoft.com/kb/828736

Google "reference C# dll in C++"

ryork
11-04-2010, 08:16 PM
That does not work, it appears that NTDirect.dll is not a C# dll.

Do I really have to Explicitly link every Function via function Pointer?

MXASJ
11-04-2010, 10:11 PM
This works in C#. You have to compile it if you want the executable. Note the Using Ninjatrader.Client thing. Its a basic "get price and quit" console app.

Hope it helps!