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

Re: porting a DLL to TS2K



PureBytes Links

Trading Reference Links

I just had that problem today.  TS2000i is Case sensitive, so depending on
which compiler you use, you will have to account for that.  I code DLL's in
Powerbasic and they have an ALIAS option in the exporting line.  If you are
coding in C/C++ you will need to have to create a .DEF file for the exporting.

Hope this helps

Regards,

Andrew

Christopher McMurry wrote:

> 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);