Post by Nicolas BronkeIch habe verschiedene Funktionen, die bisher Statisch aufgerufen wurden. Nun
wollte ich die auf dynamischen Aufruf umstellen um Resourcen zu sparen.
Aber irgendwie klappt das nicht so richtig. Die Parameter passen zusammen
und dennoch kommt es zu einer Exception.
Gibt es da Beschränkungen z, B. kein TImage oder so?
Grüsse
Nicolas
Also:
If you are doing VCL code in A DLL, you can not share it with VCL
code in your app. You need to pass raw data between the apps and not
any pointers to VCL objects.
From the help file of an OLD DELPHI
//
If a DLL exports any procedures or functions that pass long strings as
parameters or function results (whether directly or nested in records or
objects), then the DLL and its client applications (or DLLs) must all
use the ShareMem unit. The same is true if one module (application or
DLL) allocates memory with New or GetMem which is deallocated by a call
to Dispose or FreeMem in another module.
ShareMem is the interface unit for the DELPHIMM.DLL shared memory
manager, which must be deployed along with applications and/or libraries
that use ShareMem. When an application or DLL uses ShareMem, the
application or DLL's memory manager is replaced by the memory manager in
DELPHIMM.DLL, making it possible to share dynamically allocated memory
between multiple modules.
When used by an application or library, the ShareMem unit should be the
first unit listed in an application or library's uses clause.
//