Problem with DLL created in Delphi

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Hi all,

I have a DLL built in Delphi 7 that has a few functions for extracting data
from some b-tree database tables. Everything works great when called by a
test app written in Delphi, yet when the same functions are called from a C#
production application, a couple of the extracts are returning no data, or
fewer records than I receive when called by the test application.

Any ideas why this would be the case? I can't debug the DLL from Visual
Studio that I'm aware of, so it's essentially a "black box" as far as VS is
concerned, but when testing and debugging from Delphi, everything works
perfectly.

I'm stumped.

TIA,
Dan
 
check the calling conventions in the Delphi dll make sure they are stdcall
and that should fix it.
 
Thanks Mark, but that doesn't appear to be the problem as all functions are
indeed defined as stdcall.
 
You could convert the dll into a COM object and try it that way. Also have
you set the C# application to use unsafe code. Actually the assembly calling
the dll to use unsafe code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top