[ SambucusELF @ 07.03.2007. 17:03 ] @
ovo je sa Lazarus - foruma. Citat: I wrote a pascal unit to use a c dll. and I used this to create two test programs, one in delphi 7 and the other in lazarus, both running under windows The delphi version run without any problem. the lazarus version, after the first call to a dll function give me a sigsegv error. I think there could be a stack corruption. But wy the same is working good with delphi? Wath must I do to cacth and fix the problem? Thanns, angman ovo sam ja napisao: Citat: I can tell you about the stuff people on www.elitesecurity.org were talking about> If you use a Borland C++ or VC++ library (dll or just lib) it WILL work with delphi, but in many cases not with gcc or other free compilers and I am almost sure because of a stack corruption. This happens especially when you are passing a vector to a function in dll, so maybe it should be done by just passing pointers around, but there could be a problem because in some cases you need to have a class declaration to be able to work with that type of pointer. This is avoidable via smart pointers in c++, but it can cause confusion. How does this help you? It probably doesn't but you should know that these stuff happen to other people aswell, so maybe you should ask some c++ developers about it... SambucusELF moze li neko malo vise da pomogne??? link ka strani je ovde: [link]http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtopic&p=16122#16122[/link] - tu se nalazi i code o kome se radi. |