PureBytes Links
Trading Reference Links
|
Hello,
I'm new to this list, so allow me to introduce myself. My name is Mark
Smeets and I'm interested in developing trading systems. Up until now
I've always used my own software, but for various reasons (mostly about
standardization) I've switched to tradestation. I wanted to port some
systems developed on my own software to tradestation but quickly came to
the conclusion that easylanguage itself wouldn't be enough for certain
computation intensive functions. Programming this functionality in a DLL
would probably solve that problem. There the trouble started. I'm used
to unix development and quickly discovered that there are some subtle
differences when developing for the windows platform. Even more so for
Tradestation. So, I have a question about developing dlls for ts2000i.
Using Borland C++ builder 5, I've made a very small dll that contains
nothing more than a function returning a constant. Nothing fancy, and I
have no problem linking the dll in a small test application. However,
when I call this dll from tradestation, I get an "Unable to open FROT"
error message (where frot is the function I'm calling).
The el code for the easylanguage function dlltest looks something like
DefineDLLFunc: "SIMPLE.DLL", LPLONG, "frot";
dlltest = frot();
The DLL is placed in C:\program files\Omega Research\Program, so that
should be ok.
Furthermore, the C++ code looks like:
#include <windows.h>
#include <elkit32.h>
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*
lpReserved)
{
return 1;
}
LPLONG __export frot()
{
return 300;
}
The elkitbor.lib file was added to the project. After building, I used a
impdef to create a DEF file. Maybe it is useful to discover what I am
doing wrong. Here it is:
LIBRARY SIMPLE.DLL
EXPORTS
@frot$qv @1 ; frot()
___CPPdebugHook @3 ; ___CPPdebugHook
What am I doing wrong? The developers kit documentation mentions that it
is not sufficient to just _export the functions. But what is?
Any help will be appreciated.
Regards,
Mark Smeets.
|