[fpc-pascal] Cannot find entry point of a routine inside a windows 64 dll

Dennis dec12 at avidsoft.com.hk
Wed Dec 13 18:12:54 CET 2017



Sven Barth via fpc-pascal wrote:
> Am 13.12.2017 11:39 schrieb "Dennis Poon" <dennis at avidsoft.com.hk 
> <mailto:dennis at avidsoft.com.hk>>:
>
>
>
> Just for clarification: is the excel_xp.dll written by you or by a 3rd 
> party? Or are you talking about a different library written by you? 
> Because in the latter case the interfacing choice between your program 
> and *that* library nicht be the culprit.
>
Let me explain. My program is a 32 bit program that collects real time 
stock prices and group the prices by each minute into Open, High, Low, 
Close, Volume of that minute. The program needs to add these rows of 
open,high,lose,close,volume in real-time to an opened Excel Spreadsheet 
(that the end users will write his own VBA formula to manipulate the 
rows I add).  To do so, I need to use Microsoft OLE Automation but I 
don't know how to do it in Lazarus. But there is a component in Delphi 
that uses OLE Automation to update an excel spreadsheet, so I wrote my 
own excel_xp.dll in Delphi to use that TExcelApplication component (from 
Delphi) which is then called by my 32-bit lazarus program.  Everything 
worked in 32-bit.

Since there is no FREE 64-bit Delphi IDE available, before I purchase a 
64-Bit delphi, I need to make sure my Lazarus program can compile to 64 
bit windows program and can call a 64-bit windows DLL so I use Lazarus 
64 bit to write a stub 64-bit windows dll to be called by my 64-bit 
Lazarus program. However, on running, it complained "Cannot find entry 
point of a routine ", which never happened when everything was 32-bit.

My question is why the exact routine definitions worked in 32-bit but 
did not work in 64 bit.

Someone might asked why I did not compile the TExcelApplication directly 
in Lazarus to do without the linked dll. I tried, it just won't compile 
and the task of translating the huge source files from Delphi to FPC is 
too daunting.

Dennis




More information about the fpc-pascal mailing list