Dear Forum,
In company we’re in the process of migration that includes HTBasic upgrade from v6.0. to v21.1.011. So far everything was going quite smooth until I faced an issue with loading our custom-built DLL for ADO (msado15.dll) calls written in Delphi XE 5 (and older). Issue is that new version doesn’t load functions with CSUBs throwing Error 7. I was able to DLL LOAD and GET and LIST DLL these functions, but they actually do nothing.
This is a sample export of one of the functions:
function ado_connect(Npar : longint;
var UserName : Tstr; var UserName_dim : Dim;
var PassWord : TStr; var Password_dim : Dim;
var DBSource : TStr; var DBSource_dim : Dim;
var Fail : SmallInt):longint;export;cdecl;
And PRO part
SUB Ado_connect(Username$,Password$,Dbsource$,INTEGER Fail)
SUBEND
I tried to re-make CSB with old DLL and new PRO, but got error from CSUB tool – Missing pre-run information.
For DLL statements, I was getting this function as:
IF NOT INMEM("ADOMaceDba") THEN
DLL LOAD "ADOMaceDba"
DLL GET "CDECL LONG ADOMaceDba:ado_connect" AS "Ado_connect"
END IF
So right now, I’m looking for newer version on Delphi and build newer DLL. I have also started to develop the same functionality with latest MSVC utilizing the same msado15.dll.
I was suggested to post in the Forum by TransEra support team, since I’m dealing with pretty old stuff 🙂
I know that it is better to upgrade/re-create DLL, but right now it would be more effective to find quick workaround, continuing to re-write the DLL a bit later.