Wow... it works in CT but no in Lazarus. Really?
Anybody else would like to help me, please?
Code like this can work
by accident. It depends on the operating system used and how the operating system loads the involved binaries. This does in no way guarantee that it will work every time, neither in Lazarus nor in CT nor in pure FPC.
If you want to pass data between libraries and a main program you must currently either use manual memory management and types like
PChar (just as if you'd interface with a C library or have a Pascal library used in C) or you need to at least use a shared memory manager, then you can use types like
String as well. However classes and exceptions are still of limits then. Only dynamic packages will solve that problem completely.