constructor in a DLL

2007-02-26 08:58:13 PM
I have a DLL built using VS2005. The DLL has a C++ class with a
constructor and some member functions. I'm trying to create an import
library using this kind of tutorial:
It seems to work great with member functions, however I think that the
constructor just doesn't work, despite I've translated a mangled name.
I've been looking at the assembler code and before calling the
constructor Borland, it just loads edx with the address of the object
and calls de constructor function.
However the dll at the start, starts working with ecx (like if he were
expecting the object in ecx instead of edx). Of course after that
things go not as nice as I'd expect.
Could this be an ABI problem, or I'm doing something wrong? How can I
fix it?
btw, I'm using borland C++ builder 6.