Hi!
I'm not really familliar in using C++-DLLs in Delphi. But perhaps you can find the problem in the typedef:
In C++ you defined "lengt" as an unsigned int, which has 4 Bytes on common systems, I think. But in Delphi you defined "lent" as a word, which has only 2 Bytes. That could be the problem.
As I said, I'm neither familiar to C++-DLLs in Delphi, nor am I familiar to C++, too (I've been only learning it for the last few weeks).
Hope, that helps a bit!
Greetings
Peter
_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".