Hmm... that is REAL BAD news. (I've been banging my head on that same error myself and been talking with others on this site about it)
I suspect perhaps...sadly... the freepascal DLL linker isn't as good as their EXE stuff. It doesn't mangle the function names, it works PERFECT or crashes - I can't figure out if its DBPRo, Freepascal, or whatever because I don't have a problem with other dll's I've done. Even not calling from freepascal.... FLUKE? I just don't know... I haven't given up though. I apologize - your test and mine worked fine RIGHT? Then as you add more DB CODE and stuff... now it just doesn't work!!!!
I don't want to point fingers cuz I don't have every "piece" (the GORG resource compiler, the FPC compiler, the DBPro compiler....
All I know is that those functions in these DLL's I'm doing ARE running EVERYDAY, every minute, second on www.wimbleoffice.com CGI code (not script...I made true EXE's to handle each web request, hand made web templates... some borrowed (with permission) pull down menu osurce I wrote an editor for... very lean - fast system - not fastest connection.... not a super WEB server either...its a desktop.
THAT is WHY I would DARE to write a dll for a lang I JUST started! I am frustated also... but I just want to make some real useful tools available I already know work.... leverage a year and a half of development/test/improving a single codebase API.
Reusuable doesn't mean LOOK the same either - many seem to think reusuable code means your programs all look the same. I say - depends what and how you reuse. If the source code all looks similiar...same style...familiar function names etc.... I'm all for it... if all your work looks cookie cut - then... well.... its probably my gfx abilities - and not the code's fault.

-=/Jaze/=-