[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

porting a DLL to TS2K



PureBytes Links

Trading Reference Links

I have a DLL that I use with TS 4.0.  I would like to use its 32-bit 
counterpart with TS 2K.  When I try to access the functions, I get a 
message from TS2K that the function cannot be found.  The EL Ref Manual 
says that, "It is very important to remember that 32-bit DLLs use 
case-sensitive exported functions declared using _cdecl, __stdcall, or 
fastcall.  For DLLs to be compatible with Easy Language, exported functions 
should be created using all uppercase letters and be declared as _stdcall."

Here's the .h file I have for my DLL.  Anyone have any suggestions on how 
to modify it for TS2K?

Thanks!
Chris

#ifndef _MYDLL_H
#define _MYDLL_H

#ifndef _MYEXP_INCLUDED
#include "myexp.h"
#endif

#ifdef USE_DLL16 /* 16bit DLL */
#define DllImport extern
#else
# ifdef __cplusplus
#define DllImport extern "C" __declspec( dllimport )
# else
#define DllImport  __declspec( dllimport )
# endif
#endif

DllImport void FAR PASCAL set_path(char *path);